lukeschmidt
03/05/2018, 4:30 AMreact-redux
library, but I keep getting the error: You must pass a component to the function returned by connect.
val connected = connect(
::mapStateToProps,
::mapDispatchToProps
)
fun RBuilder.AppContainer() {
div {
connected(App()) // Pass Component Here
}
}
What would the correct syntax be to pass this component to the connected
function?
Note: I’m just using the App Component from the create-kotlin-react
repo that looks like this:
class App : RComponent<RProps, RState>() {
override fun RBuilder.render() {
div("App-header") {
logo()
h2 {
+"Welcome to React with Kotlin"
}
}
p("App-intro") {
+"To get started, edit "
code { +"app/App.kt" }
+" and save to reload."
}
p("App-ticker") {
ticker()
}
}
}
fun RBuilder.app() = child(App::class) {}
bashor
03/05/2018, 11:34 AMFilipp Riabchun
03/05/2018, 11:36 AMApp::class.js
Filipp Riabchun
03/05/2018, 11:39 AMlukeschmidt
03/05/2018, 4:13 PM