Skip to content

Commit

Permalink
docs: Update produce.mdx (#868)
Browse files Browse the repository at this point in the history
Just missing the word `to` in the middle of the sentence.
  • Loading branch information
zball committed Nov 24, 2021
1 parent 6e7cd9a commit fb28e88
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion website/docs/produce.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ The Immer package exposes a default function that does all the work.

`produce(currentState, recipe: (draftState) => void): nextState`

`produce` takes a base state, and a _recipe_ that can be used perform all the desired mutations on the `draft` that is passed in. The interesting thing about Immer is that the `baseState` will be untouched, but the `nextState` will reflect all changes made to `draftState`.
`produce` takes a base state, and a _recipe_ that can be used to perform all the desired mutations on the `draft` that is passed in. The interesting thing about Immer is that the `baseState` will be untouched, but the `nextState` will reflect all changes made to `draftState`.

Inside the recipe, all standard JavaScript APIs can be used on the `draft` object, including field assignments, `delete` operations, and mutating array, Map and Set operations like `push`, `pop`, `splice`, `set`, `sort`, `remove`, etc.

Expand Down

0 comments on commit fb28e88

Please sign in to comment.