installation.md
This file
Path
docs/installation.md
18 lines · 858 bytes · Markdown
Last changed by
Merge pull request #421 from immerjs/docsMichel Weststratebefore adoption9be6e46
History of this fileTake it
Merge pull request #421 from immerjs/docsMichel Weststratebefore adoption9be6e46
lines 1–18why, one step back1---2id: installation3title: Installation4---56<div id="codefund"><!-- fallback content --></div>78Immer can be installed as a direct dependency, and will work in any ES5 environment:910- Yarn: `yarn add immer`11- NPM: `npm install immer`12- CDN: Exposed global is `immer`13 - Unpkg: `<script src="https://unpkg.com/immer/dist/immer.umd.js"></script>`14 - JSDelivr: `<script src="https://cdn.jsdelivr.net/npm/immer/dist/immer.umd.js"></script>`1516## Immer on older JavaScript environments?1718By default `produce` tries to use proxies for optimal performance. However, on older JavaScript engines `Proxy` is not available. For example, when running Microsoft Internet Explorer or React Native (if < v0.59 or when using the Hermes engine) on Android. In such cases, Immer will fallback to an ES5 compatible implementation which works identical, but is a bit slower.