Skip to content

Commit ea35771

Browse files
authored
[Docs] Reorder categories, remove Other category and move its pages (reduxjs#3898)
Former-commit-id: 3ae9d7b
1 parent 37393eb commit ea35771

18 files changed

+35
-33
lines changed

docs/api/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ hide_title: true
66

77
# API Reference
88

9-
The Redux API surface is tiny. Redux defines a set of contracts for you to implement (such as [reducers](../Glossary.md#reducer)) and provides a few helper functions to tie these contracts together.
9+
The Redux API surface is tiny. Redux defines a set of contracts for you to implement (such as [reducers](../understanding/thinking-in-redux/Glossary.md#reducer)) and provides a few helper functions to tie these contracts together.
1010

1111
This section documents the complete Redux API. Keep in mind that Redux is only concerned with managing the state. In a real app, you'll also want to use UI bindings like [react-redux](https://github.com/gaearon/react-redux).
1212

docs/api/Store.md.REMOVED.git-id

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
c9c9e3c89951aca829cbebbac7054eff2ba7534e
1+
72f0e536b6bfffb8535e63dce5976563a13dcece
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
8e1b9e23ed6f9db0a94a9294f63b928c791785f6
1+
0c74fe5d6c28ea08e41a9620860e2fe1056d429d

docs/api/bindActionCreators.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ hide_title: true
66

77
# `bindActionCreators(actionCreators, dispatch)`
88

9-
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.
9+
Turns an object whose values are [action creators](../understanding/thinking-in-redux/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.
1010

1111
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.
1212

@@ -16,7 +16,7 @@ For convenience, you can also pass an action creator as the first argument, and
1616

1717
#### Parameters
1818

19-
1. `actionCreators` (_Function_ or _Object_): An [action creator](../Glossary.md#action-creator), or an object whose values are action creators.
19+
1. `actionCreators` (_Function_ or _Object_): An [action creator](../understanding/thinking-in-redux/Glossary.md#action-creator), or an object whose values are action creators.
2020

2121
2. `dispatch` (_Function_): A [`dispatch`](Store.md#dispatchaction) function available on the [`Store`](Store.md) instance.
2222

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
e284dca79c60bbbcf0bf0529b2a91a1e471300c1
1+
97d4e9bff3ef6ef1eca7f34ee470bb276251f88b

docs/api/compose.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ hide_title: true
99
Composes functions from right to left.
1010

1111
This is a functional programming utility, and is included in Redux as a convenience.
12-
You might want to use it to apply several [store enhancers](../Glossary.md#store-enhancer) in a row.
12+
You might want to use it to apply several [store enhancers](../understanding/thinking-in-redux/Glossary.md#store-enhancer) in a row.
1313

1414
#### Arguments
1515

docs/api/createStore.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ There should only be a single store in your app.
1111

1212
#### Arguments
1313

14-
1. `reducer` _(Function)_: A [reducing function](../Glossary.md#reducer) that returns the next [state tree](../Glossary.md#state), given the current state tree and an [action](../Glossary.md#action) to handle.
14+
1. `reducer` _(Function)_: A [reducing function](../understanding/thinking-in-redux/Glossary.md#reducer) that returns the next [state tree](../understanding/thinking-in-redux/Glossary.md#state), given the current state tree and an [action](../understanding/thinking-in-redux/Glossary.md#action) to handle.
1515

1616
2. [`preloadedState`] _(any)_: The initial state. You may optionally specify it to hydrate the state from the server in universal apps, or to restore a previously serialized user session. If you produced `reducer` with [`combineReducers`](combineReducers.md), this must be a plain object with the same shape as the keys passed to it. Otherwise, you are free to pass anything that your `reducer` can understand.
1717

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
71a09935342dbe5832630bb1fd13a69260359e67
1+
884b4c438bf7abd2c98c5797055f3bd04e94c482

docs/faq/ReactRedux.md.REMOVED.git-id

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ee79002d71e2c3a5ea96af16aab8ade3a8560711
1+
213c0c2c3eee51440e5a892071c59547a2619de9

docs/recipes/MigratingToRedux.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ We don't want to lock you in!
1313

1414
## From Flux
1515

16-
[Reducers](../Glossary.md#reducer) capture “the essence” of Flux Stores, so it's possible to gradually migrate an existing Flux project towards Redux, whether you are using [Flummox](http://github.com/acdlite/flummox), [Alt](http://github.com/goatslacker/alt), [traditional Flux](https://github.com/facebook/flux), or any other Flux library.
16+
[Reducers](../understanding/thinking-in-redux/Glossary.md#reducer) capture “the essence” of Flux Stores, so it's possible to gradually migrate an existing Flux project towards Redux, whether you are using [Flummox](http://github.com/acdlite/flummox), [Alt](http://github.com/goatslacker/alt), [traditional Flux](https://github.com/facebook/flux), or any other Flux library.
1717

1818
Your process will look like this:
1919

docs/recipes/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,5 @@ These are some use cases and code snippets to get you started with Redux in a re
2020
- [Isolating Redux Sub-Apps](IsolatingSubapps.md)
2121
- [Using Immutable.JS with Redux](UsingImmutableJS.md)
2222
- [Code Splitting](CodeSplitting.md)
23+
- [Troubleshooting](Troubleshooting.md)
2324
- [Structuring Reducers](structuring-reducers/StructuringReducers.md)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4ec813343df774979c6330652706a1bd759d2589
1+
571a3c1934c0cd249fb855870325a9f555d5fdad
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0bc33b24d5ef987d98dc222ac56457676b239a52
1+
7dc6bf13a048526ea11a1847314e48616d5fca5e

docs/understanding/thinking-in-redux/ThreePrinciples.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Redux can be described in three fundamental principles:
1111

1212
### Single source of truth
1313

14-
**The [global state](../../Glossary.md#state) of your application is stored in an object tree within a single [store](../../Glossary.md#store).**
14+
**The [global state](./Glossary.md#state) of your application is stored in an object tree within a single [store](./Glossary.md#store).**
1515

1616
This makes it easy to create universal apps, as the state from your server can be serialized and hydrated into the client with no extra coding effort. A single state tree also makes it easier to debug or inspect an application; it also enables you to persist your app's state in development, for a faster development cycle. Some functionality which has been traditionally difficult to implement - Undo/Redo, for example - can suddenly become trivial to implement, if all of your state is stored in a single tree.
1717

@@ -37,7 +37,7 @@ console.log(store.getState())
3737

3838
### State is read-only
3939

40-
**The only way to change the state is to emit an [action](../../Glossary.md#action), an object describing what happened.**
40+
**The only way to change the state is to emit an [action](./Glossary.md), an object describing what happened.**
4141

4242
This ensures that neither the views nor the network callbacks will ever write directly to the state. Instead, they express an intent to transform the state. Because all changes are centralized and happen one by one in a strict order, there are no subtle race conditions to watch out for. As actions are just plain objects, they can be logged, serialized, stored, and later replayed for debugging or testing purposes.
4343

@@ -55,7 +55,7 @@ store.dispatch({
5555

5656
### Changes are made with pure functions
5757

58-
**To specify how the state tree is transformed by actions, you write pure [reducers](../../Glossary.md#reducer).**
58+
**To specify how the state tree is transformed by actions, you write pure [reducers](./Glossary.md#reducer).**
5959

6060
Reducers are just pure functions that take the previous state and an action, and return the next state. Remember to return new state objects, instead of mutating the previous state. You can start with a single reducer, and as your app grows, split it off into smaller reducers that manage specific parts of the state tree. Because reducers are just functions, you can control the order in which they are called, pass additional data, or even make reusable reducers for common tasks such as pagination.
6161

website/_redirects.REMOVED.git-id

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
bdd7a5aa79ff8387a95f2d35bae27f584c565c23
1+
f30372243f37def103b1ebcf2d468a082600f584

website/sidebars.js

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,6 @@ module.exports = {
88
'introduction/ecosystem',
99
'introduction/examples'
1010
],
11-
'Understanding Redux': [
12-
{
13-
type: 'category',
14-
label: 'Thinking in Redux',
15-
items: [
16-
'understanding/thinking-in-redux/motivation',
17-
'understanding/thinking-in-redux/three-principles'
18-
]
19-
},
20-
{
21-
type: 'category',
22-
label: 'History and Design',
23-
items: ['understanding/history-and-design/prior-art']
24-
}
25-
],
2611
Tutorials: [
2712
'tutorials/tutorials-index',
2813
{
@@ -78,6 +63,7 @@ module.exports = {
7863
'recipes/isolating-redux-sub-apps',
7964
'recipes/using-immutablejs-with-redux',
8065
'recipes/code-splitting',
66+
'recipes/troubleshooting',
8167
{
8268
type: 'category',
8369
label: 'Structuring Reducers',
@@ -97,6 +83,22 @@ module.exports = {
9783
]
9884
}
9985
],
86+
'Understanding Redux': [
87+
{
88+
type: 'category',
89+
label: 'Thinking in Redux',
90+
items: [
91+
'understanding/thinking-in-redux/motivation',
92+
'understanding/thinking-in-redux/three-principles',
93+
'understanding/thinking-in-redux/glossary'
94+
]
95+
},
96+
{
97+
type: 'category',
98+
label: 'History and Design',
99+
items: ['understanding/history-and-design/prior-art']
100+
}
101+
],
100102
FAQ: [
101103
'faq',
102104
'faq/general',
@@ -112,7 +114,6 @@ module.exports = {
112114
'faq/miscellaneous'
113115
],
114116
'Style Guide': ['style-guide/style-guide'],
115-
Other: ['glossary', 'troubleshooting'],
116117
'API Reference': [
117118
'api/api-reference',
118119
'api/createstore',

0 commit comments

Comments
 (0)