Skip to content

Commit

Permalink
Merge pull request #3135 from vvcigy/patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
markerikson authored Jan 30, 2023
2 parents 034b086 + 9917fdf commit bdf8af3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/api/otherExports.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,6 @@ The default immutable update function from the [`immer` library](https://immerjs

[The `current` function](https://immerjs.github.io/immer/current) from the [`immer` library](https://immerjs.github.io/immer/), which takes a snapshot of the current state of a draft and finalizes it (but without freezing). Current is a great utility to print the current state during debugging, and the output of `current` can also be safely leaked outside the producer.

### `original`

[The `original` function](https://immerjs.github.io/immer/original) from the [`immer` library](https://immerjs.github.io/immer/), which returns the original object. This is particularly useful for referential equality check in reducers.

```ts
import { createReducer, createAction, current } from '@reduxjs/toolkit'

Expand All @@ -80,6 +76,10 @@ const todosReducer = createReducer(initialState, (builder) => {
})
```

### `original`

[The `original` function](https://immerjs.github.io/immer/original) from the [`immer` library](https://immerjs.github.io/immer/), which returns the original object. This is particularly useful for referential equality check in reducers.

### `isDraft`

[The `isDraft` function](https://immerjs.github.io/immer/original) from the [`immer` library](https://immerjs.github.io/immer/), which checks to see if a given value is a Proxy-wrapped "draft" state.
Expand Down

0 comments on commit bdf8af3

Please sign in to comment.