diff --git a/lib/src/commonMain/kotlin/org/reduxkotlin/CreateStore.kt b/lib/src/commonMain/kotlin/org/reduxkotlin/CreateStore.kt index 159ee07..7fedbc1 100644 --- a/lib/src/commonMain/kotlin/org/reduxkotlin/CreateStore.kt +++ b/lib/src/commonMain/kotlin/org/reduxkotlin/CreateStore.kt @@ -105,7 +105,7 @@ fun 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() } @@ -122,7 +122,7 @@ fun 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() } diff --git a/website/docs/api/Store.md b/website/docs/api/Store.md index a9da49b..4d54da2 100644 --- a/website/docs/api/Store.md +++ b/website/docs/api/Store.md @@ -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 @@ -116,7 +116,7 @@ store.dispatch(AddTodo("Read about the middleware"))
-### 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