aviadmini
12/06/2018, 5:42 AM@JsModule("@material-ui/core/styles/withTheme")
private external val withThemeModule: dynamic
val withTheme: HOC<RProps, RMuiProps> = withThemeModule.default
I was trying to wrap my component like this
withTheme.invoke { child(MyComponent::class) {} }
.invoke {}
But React tells me Functions are not valid as a React child. This may happen if you return a Component instead of <Component /> from render. Or maybe you meant to call this function rather than return it.
any time it's invoked
I've seen an example of HOC usage for GoogleMap here: https://github.com/JetBrains/kotlin-wrappers/issues/13
However the typescript function signature is different from the one in MUI.