Skip to content

Commit c9d7b92

Browse files
authored
Merge pull request #4594 from dominikbulaj/patch-1
Update immer-reducers.md
2 parents e0887b7 + 18b8cfc commit c9d7b92

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/usage/immer-reducers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ Writing immutable update logic by hand _is_ hard, and **accidentally mutating st
150150
Immer provides a function called `produce`, which accepts two arguments: your original `state`, and a callback function. The callback function is given a "draft" version of that state, and inside the callback, it is safe to write code that mutates the draft value. Immer tracks all attempts to mutate the draft value and then replays those mutations using their immutable equivalents to create a safe, immutably updated result:
151151

152152
```js
153-
import produce from 'immer'
153+
import { produce } from 'immer'
154154

155155
const baseState = [
156156
{

0 commit comments

Comments
 (0)