Skip to content

Commit 98794b8

Browse files
authored
Merge pull request #493 from scilganon/patch-1
Update original.md
2 parents b55ef46 + 3425900 commit 98794b8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/original.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ sidebar_label: Original
99
Immer exposes a named export `original` that will get the original object from the proxied instance inside `produce` (or return `undefined` for unproxied values). A good example of when this can be useful is when searching for nodes in a tree-like state using strict equality.
1010

1111
```js
12-
import {original} from "immer"
12+
import {original, produce} from "immer"
1313

1414
const baseState = {users: [{name: "Richie"}]}
1515
const nextState = produce(baseState, draftState => {
@@ -20,7 +20,7 @@ const nextState = produce(baseState, draftState => {
2020
Just want to know if a value is a proxied instance? Use the `isDraft` function!
2121

2222
```js
23-
import {isDraft} from "immer"
23+
import {isDraft, produce} from "immer"
2424

2525
const baseState = {users: [{name: "Bobby"}]}
2626
const nextState = produce(baseState, draft => {

0 commit comments

Comments
 (0)