feat: allow using functional components with hooks

This commit is contained in:
Vladimir Gorej
2021-10-12 21:57:29 +03:00
parent c6058f85b9
commit c31cb3079a

View File

@@ -70,9 +70,9 @@ export const render = (getSystem, getStore, getComponent, getComponents, domNode
}
// Render try/catch wrapper
const createClass = component => class extends Component {
const createClass = OriginalComponent => class extends Component {
render() {
return component(this.props)
return <OriginalComponent {...this.props} />
}
}