main.react.redux.Helpers.kt Maven / Gradle / Ivy
package react.redux
import kotlinext.js.js
import react.HOC
import react.Props
fun rConnect(
options: (Options>.() -> Unit) = {},
): HOC, Props> {
return connect>(
undefined,
undefined,
undefined,
js {
getDisplayName = { name: String -> "RConnect($name)" }
methodName = "rConnect"
options(this)
}.unsafeCast>>()
)
}
fun rConnect(
mapStateToProps: P.(S, OP) -> Unit,
options: (Options.() -> Unit) = {},
): HOC {
return connect(
{ state: S, ownProps: OP ->
js {
mapStateToProps(this, state, ownProps)
}.unsafeCast
© 2015 - 2025 Weber Informatics LLC | Privacy Policy