Skip to content
Myr

Merge pull request #114 from xaviergonz/patch-1

Before adoption: this commit came in with the history the project adopted, so no landing records it.

small grammatical fixes for readme

authored by Michel Weststrate · committed by GitHub · parents 3f64997, c91a736 · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:readme.md+1 added-1 removed
133 unmodified lines
134Creating Redux reducer is just a sample application of the Immer package.135Immer is not just designed to simplify Redux reducers.136It can be used in any context where you have an immutable data tree that you want to clone and modify (with structural sharing).137138_Note: it might be tempting after using producers a while, to just put `produce` in your root reducer, and then past the draft along to each reducer and work on that. Don't do that. It kills the point of Redux where each reducer is testable as pure reducer. Immer is best used when applying it to small individual pieces of logic._138_Note: it might be tempting after using producers for a while, to just place `produce` in your root reducer and then pass the draft to each reducer and work directly over such draft. Don't do that. It kills the point of Redux where each reducer is testable as pure reducer. Immer is best used when applying it to small individual pieces of logic._139140## React.setState example141142Deep updates in the state of React components can be greatly simplified as well by using immer.
277 unmodified lines