Skip to content
Myr

BREAKING CHANGE: added migration guide

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

authored by Michel Weststrate · committed by Michel Weststrate · parent 9c498e1 · Browse files · 1 file+6 added−0 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+6 added−0 removed

  • other:+6 added−0 removed

1 file+6 added−0 removed

modified:readme.md+6 added
709 unmodified lines
710- Immer is roughly as fast as ImmutableJS. However, the _immutableJS + toJS_ makes clear the cost that often needs to be paid later; converting the immutableJS objects back to plain objects, to be able to pass them to components, over the network etc... (And there is also the upfront cost of converting data received from e.g. the server to immutable JS)711- Generating patches doesn't significantly slow immer down712- The ES5 fallback implementation is roughly twice as slow as the proxy implementation, in some cases worse.713714## Migration715716**Immer 1.\* -> 2.0**717718Make sure you don't return any promises as state, because `produce` will actually invoke the promise and wait until it settles.719720## FAQ721722_(for those who skimmed the above instead of actually reading)_723
35 unmodified lines