From 0423fb9de9aefa93a34baec9e15835037ecb5a90 Mon Sep 17 00:00:00 2001 From: Shohei Kondo Date: Mon, 5 Aug 2019 04:19:34 +0900 Subject: [PATCH] docs: fix store methods link (#3497) Former-commit-id: db7d881306f423d4dacab3f761228b9ee54ad333 --- docs/Glossary.md.REMOVED.git-id | 2 +- docs/Troubleshooting.md.REMOVED.git-id | 2 +- docs/advanced/AsyncFlow.md | 2 +- docs/advanced/Middleware.md.REMOVED.git-id | 2 +- docs/api/README.md | 6 +++--- docs/api/Store.md.REMOVED.git-id | 2 +- docs/api/applyMiddleware.md.REMOVED.git-id | 2 +- docs/api/bindActionCreators.md | 8 ++++---- docs/api/createStore.md | 2 +- docs/basics/Actions.md | 4 ++-- docs/basics/DataFlow.md | 6 +++--- docs/basics/Store.md | 6 +++--- docs/basics/UsageWithReact.md.REMOVED.git-id | 2 +- docs/recipes/ReducingBoilerplate.md.REMOVED.git-id | 2 +- src/createStore.js.REMOVED.git-id | 2 +- 15 files changed, 25 insertions(+), 25 deletions(-) diff --git a/docs/Glossary.md.REMOVED.git-id b/docs/Glossary.md.REMOVED.git-id index 78b777c9a0..5015db0e31 100644 --- a/docs/Glossary.md.REMOVED.git-id +++ b/docs/Glossary.md.REMOVED.git-id @@ -1 +1 @@ -f1e22652399d08b263b74719ed8f39d7b5bdd27b \ No newline at end of file +de724b1ca1df66086e2e63dca00fd8072312fdd9 \ No newline at end of file diff --git a/docs/Troubleshooting.md.REMOVED.git-id b/docs/Troubleshooting.md.REMOVED.git-id index 1f28db6b9f..1e9aca6dd2 100644 --- a/docs/Troubleshooting.md.REMOVED.git-id +++ b/docs/Troubleshooting.md.REMOVED.git-id @@ -1 +1 @@ -27d89aaee84620f27810f2e4f790f0a9848e5fb4 \ No newline at end of file +3396f25b19f4d2e560ed90b0ed297fd99a7c35b7 \ No newline at end of file diff --git a/docs/advanced/AsyncFlow.md b/docs/advanced/AsyncFlow.md index af061b4ccf..5bb4759739 100644 --- a/docs/advanced/AsyncFlow.md +++ b/docs/advanced/AsyncFlow.md @@ -11,7 +11,7 @@ Without [middleware](Middleware.md), Redux store only supports [synchronous data You may enhance [`createStore()`](../api/createStore.md) with [`applyMiddleware()`](../api/applyMiddleware.md). It is not required, but it lets you [express asynchronous actions in a convenient way](AsyncActions.md). -Asynchronous middleware like [redux-thunk](https://github.com/gaearon/redux-thunk) or [redux-promise](https://github.com/acdlite/redux-promise) wraps the store's [`dispatch()`](../api/Store.md#dispatch) method and allows you to dispatch something other than actions, for example, functions or Promises. Any middleware you use can then intercept anything you dispatch, and in turn, can pass actions to the next middleware in the chain. For example, a Promise middleware can intercept Promises and dispatch a pair of begin/end actions asynchronously in response to each Promise. +Asynchronous middleware like [redux-thunk](https://github.com/gaearon/redux-thunk) or [redux-promise](https://github.com/acdlite/redux-promise) wraps the store's [`dispatch()`](../api/Store.md#dispatchaction) method and allows you to dispatch something other than actions, for example, functions or Promises. Any middleware you use can then intercept anything you dispatch, and in turn, can pass actions to the next middleware in the chain. For example, a Promise middleware can intercept Promises and dispatch a pair of begin/end actions asynchronously in response to each Promise. When the last middleware in the chain dispatches an action, it has to be a plain object. This is when the [synchronous Redux data flow](../basics/DataFlow.md) takes place. diff --git a/docs/advanced/Middleware.md.REMOVED.git-id b/docs/advanced/Middleware.md.REMOVED.git-id index fe7c68ca47..e57b7fcc16 100644 --- a/docs/advanced/Middleware.md.REMOVED.git-id +++ b/docs/advanced/Middleware.md.REMOVED.git-id @@ -1 +1 @@ -bbc1e5225652f760034e8bb3ea51eb5ce794564a \ No newline at end of file +a573d2a32cfc6baaa712f47a489ba4db0ee50460 \ No newline at end of file diff --git a/docs/api/README.md b/docs/api/README.md index 40639ac2e2..7c6737dbb9 100644 --- a/docs/api/README.md +++ b/docs/api/README.md @@ -23,9 +23,9 @@ This section documents the complete Redux API. Keep in mind that Redux is only c - [Store](Store.md) - [getState()](Store.md#getState) - - [dispatch(action)](Store.md#dispatch) - - [subscribe(listener)](Store.md#subscribe) - - [replaceReducer(nextReducer)](Store.md#replaceReducer) + - [dispatch(action)](Store.md#dispatchaction) + - [subscribe(listener)](Store.md#subscribelistener) + - [replaceReducer(nextReducer)](Store.md#replacereducernextreducer) ### Importing diff --git a/docs/api/Store.md.REMOVED.git-id b/docs/api/Store.md.REMOVED.git-id index 0fea7f7297..910a171299 100644 --- a/docs/api/Store.md.REMOVED.git-id +++ b/docs/api/Store.md.REMOVED.git-id @@ -1 +1 @@ -982db5858704d4b5502c1c7ef635b7e741d6dfa7 \ No newline at end of file +a1e3531009cbbed0d8e2b3bf76b2f96e0f6fe919 \ No newline at end of file diff --git a/docs/api/applyMiddleware.md.REMOVED.git-id b/docs/api/applyMiddleware.md.REMOVED.git-id index be10be9df9..d6319e937a 100644 --- a/docs/api/applyMiddleware.md.REMOVED.git-id +++ b/docs/api/applyMiddleware.md.REMOVED.git-id @@ -1 +1 @@ -63f310bdeb2ea916e31d4a2a38371027e969fa63 \ No newline at end of file +39bb8971fca8a21d345eec00cebf9a7fc4830bbd \ No newline at end of file diff --git a/docs/api/bindActionCreators.md b/docs/api/bindActionCreators.md index 94af4448b7..a0afb131b9 100644 --- a/docs/api/bindActionCreators.md +++ b/docs/api/bindActionCreators.md @@ -7,11 +7,11 @@ hide_title: true # `bindActionCreators(actionCreators, dispatch)` -Turns an object whose values are [action creators](../Glossary.md#action-creator), into an object with the same keys, but with every action creator wrapped into a [`dispatch`](Store.md#dispatch) call so they may be invoked directly. +Turns an object whose values are [action creators](../Glossary.md#action-creator), into an object with the same keys, but with every action creator wrapped into a [`dispatch`](Store.md#dispatchaction) call so they may be invoked directly. -Normally you should just call [`dispatch`](Store.md#dispatch) directly on your [`Store`](Store.md) instance. If you use Redux with React, [react-redux](https://github.com/gaearon/react-redux) will provide you with the [`dispatch`](Store.md#dispatch) function so you can call it directly, too. +Normally you should just call [`dispatch`](Store.md#dispatchaction) directly on your [`Store`](Store.md) instance. If you use Redux with React, [react-redux](https://github.com/gaearon/react-redux) will provide you with the [`dispatch`](Store.md#dispatchaction) function so you can call it directly, too. -The only use case for `bindActionCreators` is when you want to pass some action creators down to a component that isn't aware of Redux, and you don't want to pass [`dispatch`](Store.md#dispatch) or the Redux store to it. +The only use case for `bindActionCreators` is when you want to pass some action creators down to a component that isn't aware of Redux, and you don't want to pass [`dispatch`](Store.md#dispatchaction) or the Redux store to it. For convenience, you can also pass an action creator as the first argument, and get a dispatch wrapped function in return. @@ -19,7 +19,7 @@ For convenience, you can also pass an action creator as the first argument, and 1. `actionCreators` (_Function_ or _Object_): An [action creator](../Glossary.md#action-creator), or an object whose values are action creators. -2. `dispatch` (_Function_): A [`dispatch`](Store.md#dispatch) function available on the [`Store`](Store.md) instance. +2. `dispatch` (_Function_): A [`dispatch`](Store.md#dispatchaction) function available on the [`Store`](Store.md) instance. #### Returns diff --git a/docs/api/createStore.md b/docs/api/createStore.md index 772734472b..569776cfa1 100644 --- a/docs/api/createStore.md +++ b/docs/api/createStore.md @@ -20,7 +20,7 @@ There should only be a single store in your app. #### Returns -([_`Store`_](Store.md)): An object that holds the complete state of your app. The only way to change its state is by [dispatching actions](Store.md#dispatch). You may also [subscribe](Store.md#subscribe) to the changes to its state to update the UI. +([_`Store`_](Store.md)): An object that holds the complete state of your app. The only way to change its state is by [dispatching actions](Store.md#dispatchaction). You may also [subscribe](Store.md#subscribelistener) to the changes to its state to update the UI. #### Example diff --git a/docs/basics/Actions.md b/docs/basics/Actions.md index 0174b3ca74..01bc6b9cdb 100644 --- a/docs/basics/Actions.md +++ b/docs/basics/Actions.md @@ -9,7 +9,7 @@ hide_title: true First, let's define some actions. -**Actions** are payloads of information that send data from your application to your store. They are the _only_ source of information for the store. You send them to the store using [`store.dispatch()`](../api/Store.md#dispatch). +**Actions** are payloads of information that send data from your application to your store. They are the _only_ source of information for the store. You send them to the store using [`store.dispatch()`](../api/Store.md#dispatchaction). Here's an example action which represents adding a new todo item: @@ -107,7 +107,7 @@ boundAddTodo(text) boundCompleteTodo(index) ``` -The `dispatch()` function can be accessed directly from the store as [`store.dispatch()`](../api/Store.md#dispatch), but more likely you'll access it using a helper like [react-redux](http://github.com/gaearon/react-redux)'s `connect()`. You can use [`bindActionCreators()`](../api/bindActionCreators.md) to automatically bind many action creators to a `dispatch()` function. +The `dispatch()` function can be accessed directly from the store as [`store.dispatch()`](../api/Store.md#dispatchaction), but more likely you'll access it using a helper like [react-redux](http://github.com/gaearon/react-redux)'s `connect()`. You can use [`bindActionCreators()`](../api/bindActionCreators.md) to automatically bind many action creators to a `dispatch()` function. Action creators can also be asynchronous and have side-effects. You can read about [async actions](../advanced/AsyncActions.md) in the [advanced tutorial](../advanced/README.md) to learn how to handle AJAX responses and compose action creators into async control flow. Don't skip ahead to async actions until you've completed the basics tutorial, as it covers other important concepts that are prerequisite for the advanced tutorial and async actions. diff --git a/docs/basics/DataFlow.md b/docs/basics/DataFlow.md index a1015f9dee..07f664685b 100644 --- a/docs/basics/DataFlow.md +++ b/docs/basics/DataFlow.md @@ -15,7 +15,7 @@ If you're still not convinced, read [Motivation](../introduction/Motivation.md) The data lifecycle in any Redux app follows these 4 steps: -1. **You call** [`store.dispatch(action)`](../api/Store.md#dispatch). +1. **You call** [`store.dispatch(action)`](../api/Store.md#dispatchaction). An [action](Actions.md) is a plain object describing _what happened_. For example: @@ -27,7 +27,7 @@ An [action](Actions.md) is a plain object describing _what happened_. For exampl Think of an action as a very brief snippet of news. “Mary liked article 42.” or “'Read the Redux docs.' was added to the list of todos.” -You can call [`store.dispatch(action)`](../api/Store.md#dispatch) from anywhere in your app, including components and XHR callbacks, or even at scheduled intervals. +You can call [`store.dispatch(action)`](../api/Store.md#dispatchaction) from anywhere in your app, including components and XHR callbacks, or even at scheduled intervals. 2. **The Redux store calls the reducer function you gave it.** @@ -100,7 +100,7 @@ While [`combineReducers()`](../api/combineReducers.md) is a handy helper utility 4. **The Redux store saves the complete state tree returned by the root reducer.** -This new tree is now the next state of your app! Every listener registered with [`store.subscribe(listener)`](../api/Store.md#subscribe) will now be invoked; listeners may call [`store.getState()`](../api/Store.md#getState) to get the current state. +This new tree is now the next state of your app! Every listener registered with [`store.subscribe(listener)`](../api/Store.md#subscribelistener) will now be invoked; listeners may call [`store.getState()`](../api/Store.md#getState) to get the current state. Now, the UI can be updated to reflect the new state. If you use bindings like [React Redux](https://github.com/gaearon/react-redux), this is the point at which `component.setState(newState)` is called. diff --git a/docs/basics/Store.md b/docs/basics/Store.md index 28233de626..2a642d4b11 100644 --- a/docs/basics/Store.md +++ b/docs/basics/Store.md @@ -13,9 +13,9 @@ The **Store** is the object that brings them together. The store has the followi - Holds application state; - Allows access to state via [`getState()`](../api/Store.md#getState); -- Allows state to be updated via [`dispatch(action)`](../api/Store.md#dispatch); -- Registers listeners via [`subscribe(listener)`](../api/Store.md#subscribe); -- Handles unregistering of listeners via the function returned by [`subscribe(listener)`](../api/Store.md#subscribe). +- Allows state to be updated via [`dispatch(action)`](../api/Store.md#dispatchaction); +- Registers listeners via [`subscribe(listener)`](../api/Store.md#subscribelistener); +- Handles unregistering of listeners via the function returned by [`subscribe(listener)`](../api/Store.md#subscribelistener). It's important to note that you'll only have a single store in a Redux application. When you want to split your data handling logic, you'll use [reducer composition](Reducers.md#splitting-reducers) instead of many stores. diff --git a/docs/basics/UsageWithReact.md.REMOVED.git-id b/docs/basics/UsageWithReact.md.REMOVED.git-id index 8a1a16d0d6..6bfc197730 100644 --- a/docs/basics/UsageWithReact.md.REMOVED.git-id +++ b/docs/basics/UsageWithReact.md.REMOVED.git-id @@ -1 +1 @@ -096182d8ce4140624f483af32cec226808be5617 \ No newline at end of file +3bc00bb07f751419aeb4daf6e5806b0ba2d3c001 \ No newline at end of file diff --git a/docs/recipes/ReducingBoilerplate.md.REMOVED.git-id b/docs/recipes/ReducingBoilerplate.md.REMOVED.git-id index f65288e668..1ad7777099 100644 --- a/docs/recipes/ReducingBoilerplate.md.REMOVED.git-id +++ b/docs/recipes/ReducingBoilerplate.md.REMOVED.git-id @@ -1 +1 @@ -e5adb02ee0a7e57874d61544b72809236092972c \ No newline at end of file +a851d648a911d0f1478c7ff0055aaaaf78ed75bc \ No newline at end of file diff --git a/src/createStore.js.REMOVED.git-id b/src/createStore.js.REMOVED.git-id index f1ede6b7de..7dc5ec95c4 100644 --- a/src/createStore.js.REMOVED.git-id +++ b/src/createStore.js.REMOVED.git-id @@ -1 +1 @@ -efb89310fdb6aadd208a379f935ef42a19714247 \ No newline at end of file +cef9a2ecaeff319d4986af24babf1c79ec9912c6 \ No newline at end of file