docs(immer-doc): add npm installation section in immer middleware docs (#1347)

This commit is contained in:
Joel Mathew Koshy 2022-10-06 21:39:13 +05:30 committed by GitHub
parent e8b05d8179
commit 200d5bc10e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,10 +3,20 @@ title: Immer middleware
nav: 16
---
The immer middleware enables you to use an immutable state in a more convenient
The [Immer](https://github.com/immerjs/immer) middleware enables you to use an immutable state in a more convenient
way. Also, with `Immer` you can simplify handling immutable data structures on
`Zustand`.
## Installation
In order to use the Immer middleware in `Zustand`, you will need to install `Immer` as a direct dependency.
```bash
npm install immer
```
## Usage
Updating simple states
```ts