Browse Source

[Beta] Simplify Immer installation guide (#5499)

main
Viktor Chernodub 2 years ago
committed by GitHub
parent
commit
1fd3538718
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      beta/src/content/learn/updating-objects-in-state.md

5
beta/src/content/learn/updating-objects-in-state.md

@ -672,9 +672,8 @@ The `draft` provided by Immer is a special type of object, called a [Proxy](http
To try Immer: To try Immer:
1. Add `use-immer` to your `package.json` as a dependency 1. Run `npm install use-immer` to add Immer as a dependency
2. Run `npm install` 2. Then replace `import { useState } from 'react'` with `import { useImmer } from 'use-immer'`
3. Then replace `import { useState } from 'react'` with `import { useImmer } from 'use-immer'`
Here is the above example converted to Immer: Here is the above example converted to Immer:

Loading…
Cancel
Save