@@ -17,13 +17,13 @@ Thunk implement must implement the `Thunk` interface, which only has one dispatc
1717A more friendly way to create a thunk is with the ` createThunk ` function. Both are illustrated below:
1818
1919```
20- val store = createStore(::reducer, applymiddleware(thunk ))
20+ val store = createStore(::reducer, applymiddleware(createThunkMiddleware() ))
2121
2222 ...
2323
24- class FooThunk: Thunk
24+ class FooThunk: Thunk<State> {
2525
26- override fun dispatch(dispatch: Dispatcher, getState: GetState, extraArg: Any?) {
26+ override fun dispatch(dispatch: Dispatcher, getState: GetState<State> , extraArg: Any?) {
2727 dispatch(FetchingFooAction)
2828 launch {
2929 val result = api.foo()
@@ -36,7 +36,7 @@ A more friendly way to create a thunk is with the `createThunk` function. Both
3636 }
3737 }
3838
39- val fetchBar = createThunk {dispatch, getState, extraArgument ->
39+ val fetchBar = createThunk<State> {dispatch, getState, extraArgument ->
4040 dispatch(FetchingBarAction)
4141 launch {
4242 val result = api.bar()
@@ -64,15 +64,15 @@ kotlin {
6464 sourceSets {
6565 commonMain { // <--- name may vary on your project
6666 dependencies {
67- implementation "org.reduxkotlin:redux-kotlin-thunk:0.2.6 "
67+ implementation "org.reduxkotlin:redux-kotlin-thunk:0.2.7 "
6868 }
6969 }
7070 }
7171```
7272
7373For JVM only:
7474```
75- implementation "org.reduxkotlin:redux-kotlin-jvm-thunk:0.2.6 "
75+ implementation "org.reduxkotlin:redux-kotlin-jvm-thunk:0.2.7 "
7676```
7777
7878[ badge-android ] : http://img.shields.io/badge/platform-android-brightgreen.svg?style=flat
0 commit comments