There's @material-ui/core/styles/withTheme and my ...
# javascript
a
There's @material-ui/core/styles/withTheme and my wrapper over it looks like
Copy code
@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
Copy code
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.