diff options
Diffstat (limited to 'kvision-modules/kvision-redux-kotlin/src')
-rw-r--r-- | kvision-modules/kvision-redux-kotlin/src/main/kotlin/pl/treksoft/kvision/redux/ReduxStore.kt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kvision-modules/kvision-redux-kotlin/src/main/kotlin/pl/treksoft/kvision/redux/ReduxStore.kt b/kvision-modules/kvision-redux-kotlin/src/main/kotlin/pl/treksoft/kvision/redux/ReduxStore.kt index 45f743f3..040b8631 100644 --- a/kvision-modules/kvision-redux-kotlin/src/main/kotlin/pl/treksoft/kvision/redux/ReduxStore.kt +++ b/kvision-modules/kvision-redux-kotlin/src/main/kotlin/pl/treksoft/kvision/redux/ReduxStore.kt @@ -24,9 +24,9 @@ package pl.treksoft.kvision.redux import org.reduxkotlin.ActionTypes import org.reduxkotlin.Middleware import org.reduxkotlin.Store +import org.reduxkotlin.Thunk import org.reduxkotlin.applyMiddleware import org.reduxkotlin.createStore -import org.reduxkotlin.createThunk import org.reduxkotlin.createThunkMiddleware import pl.treksoft.kvision.state.ObservableState @@ -92,7 +92,7 @@ class ReduxStore<S : Any, A : RAction>( */ fun dispatch(actionCreator: ActionCreator<A, S>) { @Suppress("UNCHECKED_CAST") - val thunk = createThunk<S> { dispatch, getState, _ -> actionCreator(dispatch as ((A) -> Unit), getState) } + val thunk: Thunk<S> = { dispatch, getState, _ -> actionCreator(dispatch as ((A) -> Unit), getState) } store.dispatch(thunk) } |