Skip to content

Commit

Permalink
Docs: Update data recommendations to encourage single test runner
Browse files Browse the repository at this point in the history
  • Loading branch information
aduth committed Mar 4, 2016
1 parent ece40d7 commit 12c0e8e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/our-approach-to-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ client/state/
├── reducer.js
├── selectors.js
├── schema.js
├── Makefile
├── README.md
└── test/
├── actions.js
Expand All @@ -98,6 +97,8 @@ client/state/

For example, the reducer responsible for maintaining the `state.sites` key within the global state can be found in `client/state/sites/reducer.js`. It's quite common that the subject reducer is itself a combined reducer. Just as it helps to split the global state into subdirectories responsible for their own part of the tree, as a subject grows, you may find that it's easier to maintain pieces as nested subdirectories. This ease of composability is one of Redux's strengths.

For your tests to be included in the Redux state test runner, you must require them in `client/state/test/index.js`. Note that each `describe` block in this file should mirror the folder structure of state.

### Actions

An action describes an intent to change the state of the application. When an action object is [dispatched](http://redux.js.org/docs/api/Store.html#dispatch) to an instance of a Redux store, the reducer function for that store is called with the action. Given the structure of our application state, specific subtrees can maintain their own state in response to any actions for which they are concerned.
Expand Down Expand Up @@ -415,4 +416,4 @@ export default ( state = 'CHECKING', action ) => {
case DESERIALIZE:
return 'CHECKING';
} );
```
```

0 comments on commit 12c0e8e

Please sign in to comment.