From e10ac7a82cc501a3e0f1ca9561e1943158d12d25 Mon Sep 17 00:00:00 2001 From: Patrick Jackson Date: Wed, 4 Dec 2019 22:25:12 -0500 Subject: [PATCH 1/2] fix typo and links --- .../commonMain/kotlin/org/reduxkotlin/CreateStore.kt | 4 ++-- website/docs/api/Store.md | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/src/commonMain/kotlin/org/reduxkotlin/CreateStore.kt b/lib/src/commonMain/kotlin/org/reduxkotlin/CreateStore.kt index 159ee07..acbb61d 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-storesubstriber |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-storesubstriber |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 From a1fc7ad5110016bc0648e54a78f72752077224ff Mon Sep 17 00:00:00 2001 From: Patrick Jackson Date: Thu, 5 Dec 2019 14:08:04 -0500 Subject: [PATCH 2/2] Update CreateStore.kt --- lib/src/commonMain/kotlin/org/reduxkotlin/CreateStore.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/commonMain/kotlin/org/reduxkotlin/CreateStore.kt b/lib/src/commonMain/kotlin/org/reduxkotlin/CreateStore.kt index acbb61d..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://www.reduxkotlin.org/api/store#subscribelistener-storesubstriber + |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://www.reduxkotlin.org/api/store#subscribelistener-storesubstriber + |https://www.reduxkotlin.org/api/store#subscribelistener-storesubscriber |for more details.""".trimMargin() }