Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
1 file+8 added−1 removed
other:+8 added−1 removed
Provenance
Commit
e4ca0d6
Tree
d7af528
Author
Michel Weststrate <mweststrate@gmail.com>
Committer
Michel Weststrate <mweststrate@gmail.com>
Parent
3f75064
1 file changed+8 added−1 removed
modified:readme.md+8 added-1 removed
148 unmodified lines
Expand all
149
150
151
152
153
153
154
155
156
157
158
159
160
148 unmodified lines
Expand all
## Pitfalls:
* Make sure to modify the state you get passed in in the callback function, not the original base state that was passed as first argument to `immer`!
* Since immer uses proxies, reading huge amounts of data from state comes with an overhead. If this ever becomes an issue (measure before optimize!), do the current state analysis before entering the `immer` block or read form the `currentState` rather than the `draftState`
No newline at end of file
* Since immer uses proxies, reading huge amounts of data from state comes with an overhead. If this ever becomes an issue (measure before optimize!), do the current state analysis before entering the `immer` block or read form the `currentState` rather than the `draftState`
## Changelog
### 0.0.4 (31-12-2017)
* Added typescript typings [#11](https://github.com/mweststrate/immer/pull/11) by [@benbraou](https://github.com/benbraou)
* Fixed bug when setting properties to `undefined`. Fixes [#12](https://github.com/mweststrate/immer/issues/12) through [#13](https://github.com/mweststrate/immer/pull/13) by [@benbraou](https://github.com/benbraou)