Skip to content

Commit c678ac1

Browse files
authored
Update README.md
1 parent ba48f64 commit c678ac1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ Thunk implement must implement the `Thunk` interface, which only has one dispatc
1717
A 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

7373
For 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

Comments
 (0)