Skip to content

docs: fix Store api sidebar links #3462

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 17, 2019
Merged
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
16 changes: 8 additions & 8 deletions docs/api/Store.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ To create it, pass your root [reducing function](../Glossary.md#reducer) to [`cr

### Store Methods

- [`getState()`](#getState)
- [`dispatch(action)`](#dispatch)
- [`subscribe(listener)`](#subscribe)
- [`replaceReducer(nextReducer)`](#replaceReducer)
- [`getState()`](#getstate)
- [`dispatch(action)`](#dispatchaction)
- [`subscribe(listener)`](#subscribelistener)
- [`replaceReducer(nextReducer)`](#replacereducernextreducer)

## Store Methods

### <a id='getState' class='anchor'></a>[`getState()`](#getState)
### getState()

Returns the current state tree of your application.
It is equal to the last value returned by the store's reducer.
Expand All @@ -37,7 +37,7 @@ _(any)_: The current state tree of your application.

<hr>

### <a id='dispatch' class='anchor'></a>[`dispatch(action)`](#dispatch)
### dispatch(action)

Dispatches an action. This is the only way to trigger a state change.

Expand Down Expand Up @@ -86,7 +86,7 @@ store.dispatch(addTodo('Read about the middleware'))

<hr>

### <a id='subscribe' class='anchor'></a>[`subscribe(listener)`](#subscribe)
### subscribe(listener)

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 current state tree inside the callback.

Expand Down Expand Up @@ -138,7 +138,7 @@ unsubscribe()

<hr>

### <a id='replaceReducer' class='anchor'></a>[`replaceReducer(nextReducer)`](#replaceReducer)
### replaceReducer(nextReducer)

Replaces the reducer currently used by the store to calculate the state.

Expand Down