Skip to content

Commit

Permalink
revert(readme): update
Browse files Browse the repository at this point in the history
  • Loading branch information
unadlib committed Jan 27, 2023
1 parent 8e906c9 commit 797cc8b
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -334,14 +334,12 @@ Yes. Mutative supports return values for reducer, and `redux-toolkit` is conside

## Migration from Immer to Mutative

1. `produce()` -> `create()`

Mutative auto freezing option is disabled by default, Immer auto freezing option is enabled by default (if disabled, Immer performance will have a more huge drop).

> You need to check if auto freezing has any impact on your project. If it depends on auto freezing, you can enable it yourself in Mutative.
### `produce()` -> `create()` {.tabset .tabset-fade}

#### Immer

```ts
import produce from 'immer';

Expand All @@ -351,7 +349,7 @@ const nextState = produce(baseState, (draft) => {
});
```

#### Mutative
Use Mutative

```ts
import { create } from 'mutative';
Expand Down

0 comments on commit 797cc8b

Please sign in to comment.