Skip to content
Myr

docs: add a migration guide for 4.0

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

authored by keenondrums · committed by Alec Larson · parent c34ff3e · Browse files · 1 file+4 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+4 added−0 removed

  • other:+4 added−0 removed

1 file+4 added−0 removed

modified:readme.md+4 added
715 unmodified lines
716**Immer 2.1 -> 2.2**717718When using TypeScript, for curried reducers that are typed in the form `produce<Type>((arg) => { })`, rewrite this to `produce((arg: Type) => { })` or `produce((arg: Draft<Type>) => { })` for correct inference.719720**Immer 3.\* -> 4.0**721722`Maps` and `Sets` are now supported by `immer` and, therefore, immutable. Your current code, where you kept immutability of `Maps` and `Sets` on your own, should keep working as before in simple cases. However, consider covering it with a sufficient number of unit tests to avoid any unexpected outcome.723724## FAQ725726_(for those who skimmed the above instead of actually reading)_727
35 unmodified lines