Comparing version 3.1.2 to 3.1.3
{ | ||
"name": "immer", | ||
"version": "3.1.2", | ||
"version": "3.1.3", | ||
"description": "Create your next immutable state by mutating the current one", | ||
"main": "dist/immer.js", | ||
"umd:main": "dist/immer.umd.js", | ||
"unpkg": "dist/immer.umd.js", | ||
"jsdelivr": "dist/immer.umd.js", | ||
"module": "dist/immer.module.js", | ||
@@ -8,0 +10,0 @@ "jsnext:main": "dist/immer.module.js", |
@@ -202,13 +202,12 @@ <img src="images/immer-logo.png" height="200px" align="right"/> | ||
```javascript | ||
import produce from 'immer' | ||
import produce from "immer" | ||
const byId = produce((draft, action) => { | ||
switch (action.type) { | ||
case RECEIVE_PRODUCTS: | ||
action.products.forEach(product => { | ||
draft[product.id] = product | ||
}) | ||
return | ||
}) | ||
} | ||
switch (action.type) { | ||
case RECEIVE_PRODUCTS: | ||
action.products.forEach(product => { | ||
draft[product.id] = product | ||
}) | ||
return | ||
} | ||
}) | ||
@@ -664,2 +663,3 @@ ``` | ||
- [react-state-tree](https://github.com/suchipi/react-state-tree) _Drop-in replacement for useState that persists your state into a redux-like state tree_ | ||
- [redux-immer](https://github.com/salvoravida/redux-immer) _is used to create an equivalent function of Redux combineReducers that works with `immer` state. Like `redux-immutable` but for `immer`_ | ||
- ... and [many more](https://www.npmjs.com/browse/depended/immer) | ||
@@ -666,0 +666,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
242181