Skip to content
Myr

Update image link in readme.md

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

authored by Justin Hedani · committed by Justin Hedani · parent 52ea47f · 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
22 unmodified lines
23The basic idea is that you will apply all your changes to a temporarily _draftState_, which is a proxy of the _currentState_.24Once all your mutations are completed, Immer will produce the _nextState_ based on the mutations to the draft state.25This means that you can interact with your data by simply modifying it, while keeping all the benefits of immutable data.2627![immer-hd.png](images/immer-hd.png)27![immer-hd.png](images/hd/immer.png)2829Using Immer is like having a personal assistant; he takes a letter (the current state), and gives you a copy (draft) to jot changes onto. Once you are done, the assistant will take your draft and produce the real immutable, final letter for you (the next state).3031A mindful reader might notice that this is quite similar to `withMutations` of ImmutableJS. It is indeed, but generalized and applied to plain, native JavaScript data structures (arrays and objects) without further needing any library.
268 unmodified lines