Skip to content

Commit

Permalink
Adding the case for nested state objects (reduxjs#2014)
Browse files Browse the repository at this point in the history
* Adding the case for nested state objects

Immutability helpers are mentioned elsewhere in the docs but I thought a reference here would be nice as I myself couldn't find the reason for my issues by looking at the troubleshooting page

* correcting spelling

* Fix wording and linkage.
  • Loading branch information
sabahang authored and timdorr committed Oct 5, 2016
1 parent 1908b4c commit 055f005
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/Troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ return state.map((todo, index) => {

Note that experimental language features are subject to change.

Also keep an eye out for nested state objects that need to be deeply copied. Both `_.extend` and `Object.assign` make a shallow copy of the state. See [Updating Nested Objects](/docs/recipes/reducers/ImmutableUpdatePatterns.md#updating-nested-objects) for suggestions on how to deal with nested state objects.

#### Don't forget to call [`dispatch(action)`](api/Store.md#dispatch)

If you define an action creator, calling it will *not* automatically dispatch the action. For example, this code will do nothing:
Expand Down

0 comments on commit 055f005

Please sign in to comment.