Skip to content

Commit

Permalink
Merge pull request #493 from scilganon/patch-1
Browse files Browse the repository at this point in the history
Update original.md
  • Loading branch information
mweststrate committed Jan 5, 2020
2 parents b55ef46 + 3425900 commit 98794b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/original.md
Expand Up @@ -9,7 +9,7 @@ sidebar_label: Original
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.

```js
import {original} from "immer"
import {original, produce} from "immer"

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

```js
import {isDraft} from "immer"
import {isDraft, produce} from "immer"

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

0 comments on commit 98794b8

Please sign in to comment.