Skip to content

Commit 9917fdf

Browse files
authored
Fix original and current examples
1 parent 034b086 commit 9917fdf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/api/otherExports.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,6 @@ The default immutable update function from the [`immer` library](https://immerjs
5858

5959
[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.
6060

61-
### `original`
62-
63-
[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.
64-
6561
```ts
6662
import { createReducer, createAction, current } from '@reduxjs/toolkit'
6763

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

79+
### `original`
80+
81+
[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.
82+
8383
### `isDraft`
8484

8585
[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.

0 commit comments

Comments
 (0)