Skip to content
Myr

Disable auto freeze in production, fixes #46, also see #76

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 f6627c0 · Browse files · 3 files+9 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

3 files+9 added−1 removed

  • other:+9 added−1 removed

3 files+9 added−1 removed

modified:src/common.js+7 added-1 removed
modified:changelog.md+1 added
1# Changelog23### 0.8.545* Immer will automatically turn auto-freezing of in production. Use `setAutoFreeze` to manually control it. See [#46](https://github.com/mweststrate/immer/issues/78), [#76](https://github.com/mweststrate/immer/pull/76)6* Fixed issue where objects were unnecessary proxied, causing exceptions. See [#78](https://github.com/mweststrate/immer/issues/78)78### 0.8.49
100 unmodified lines
modified:readme.md+1 added
181 unmodified lines
182 This protects against accidental modifications of the state tree outside of a producer.183 This comes with a performance impact, so it is recommended to disable this option in production.184 It is by default enabled.185 Use `setAutoFreeze(true / false)` to turn this feature on or off.186 By default it is turned on during local development, and turned off in production.187188## Immer on older JavaScript environments?189190By default `produce` tries to use proxies for optimal performance.
74 unmodified lines