Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/src/commonMain/kotlin/org/reduxkotlin/CreateStore.kt
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ fun <State> createStore(
|If you would like to be notified after the store has been updated,
|subscribe from a component and invoke store.getState() in the
|callback to access the latest state. See
|https://redux.js.org/api-reference/store#subscribe(listener)
|https://www.reduxkotlin.org/api/store#subscribelistener-storesubscriber
|for more details.""".trimMargin()
}

Expand All @@ -122,7 +122,7 @@ fun <State> createStore(
check(!isDispatching) {
"""You may not unsubscribe from a store listener while the reducer
|is executing. See
|https://redux.js.org/api-reference/store#subscribe(listener)
|https://www.reduxkotlin.org/api/store#subscribelistener-storesubscriber
|for more details.""".trimMargin()
}

Expand Down
10 changes: 5 additions & 5 deletions website/docs/api/Store.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ To create it, pass your root [reducing function](../Glossary.md#reducer) to

### Store Methods

- [`getState()`](#getstate)
- [`dispatch(action)`](#dispatchaction)
- [`subscribe(listener)`](#subscribelistener)
- [`replaceReducer(nextReducer)`](#replacereducernextreducer)
- [`getState()`](#getstate-_or_-state-property)
- [`dispatch(action)`](#dispatchaction-any-any)
- [`subscribe(listener)`](#subscribelistener-storesubscriber)
- [`replaceReducer(nextReducer)`](#replacereducernextreducer-reducer-state-unit)

## Store Methods

Expand Down Expand Up @@ -116,7 +116,7 @@ store.dispatch(AddTodo("Read about the middleware"))

<hr>

### subscribe(listener: StoreSubstriber)
### subscribe(listener: StoreSubscriber)

Adds a change listener. It will be called any time an action is dispatched, and some part of the
state tree may potentially have changed. You may then call [`getState()`](#getState) to read the
Expand Down