Skip to content
Myr

support typescript 2.8+

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

authored by aleclarson · committed by aleclarson · parent 512256b · Browse files · 2 files+2 added−2 removed
This commit

State

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

Diff stats

2 files+2 added−2 removed

  • other:+2 added−2 removed

2 files+2 added−2 removed

modified:package.json+1 added-1 removed
modified:readme.md+1 added-1 removed
497 unmodified lines
498```499500This ensures that the only place you can modify your state is in your produce callbacks. It even works recursively and with `ReadonlyArray`s!501502Using TypeScript v2.8.x and lower is _not_ supported by Immer.502Using TypeScript v2.7.x or lower is _not_ supported by Immer.503504## Immer on older JavaScript environments?505506By default `produce` tries to use proxies for optimal performance. However, on older JavaScript engines `Proxy` is not available. For example, when running Microsoft Internet Explorer or React Native on Android. In such cases, Immer will fallback to an ES5 compatible implementation which works identical, but is a bit slower.
200 unmodified lines