immer README

The project's README from github.com/immerjs/immer. As one markdown file: README.md.

Immer

npm Build Status Coverage Status code style: prettier OpenCollective OpenCollective Gitpod Ready-to-Code

Create the next immutable state tree by simply modifying the current tree

Winner of the "Breakthrough of the year" React open source award and "Most impactful contribution" JavaScript open source award in 2019

Contribute using one-click online setup

You can use Gitpod (a free online VSCode like IDE) for contributing online. With a single click it will launch a workspace and automatically:

so that you can start coding straight away.

Open in Gitpod

Documentation

The documentation of this package is hosted at https://immerjs.github.io/immer/

Support

Did Immer make a difference to your project? Join the open collective at https://opencollective.com/immer!

Release notes

https://github.com/immerjs/immer/releases

immer (immerjs/immer)

redux
Searching Database…

29K ·GitHub
What is this?Immer is a small JavaScript library for working with immutable state: you write code that mutates your current state, and it produces the next immutable state tree for you.
Is it a framework I adopt, or a library I call from my code?A plain library — one npm package with zero runtime dependencies that you call from your own JavaScript, not a framework that dictates your app structure.
How do I add it to a project?Install it from npm — npm install immer (or yarn add immer) — and import it like any other package; the full documentation is hosted at immerjs.github.io/immer.
Do I need to install anything else alongside it?No. The package ships zero runtime dependencies, so any JavaScript setup with npm or yarn is enough.
Is it tied to React, or can I use it with anything?It is plain JavaScript, so anything can use it, though it is best known in the React world — it won a 2019 React open source award — and is popular for Redux-style reducers.
Does it run only in Node, or in the browser too?It is pure JavaScript with no native parts, so it runs wherever JavaScript does — in the browser for web apps and in Node on the server.
What does code written with Immer actually look like?You hand it your current state plus a function that changes a draft copy; Immer tracks what you touched and returns a brand-new immutable state, so you skip manual spreading and copying.
Does it come with type definitions for Flow or TypeScript?The repo maintains Flow typings — its test script runs yarn flow check over __tests__/flow — so the API is typed for Flow users.
Can I hack on it without setting up a local dev environment?Yes. The README offers a one-click Gitpod workspace: it clones the repo, installs the dependencies and runs 'yarn run start', so you can start coding straight away in the browser.
Is the project still alive?Yes — it is not archived, has automated release CI (release.yml) alongside test and docs workflows, and has been developed since 2017 with a release notes section in the README.
What are similar projects?normalizr, Recoil, zustand, nuqs, redux-form, reactstrap, reselect, redux
Creator
immerjs
Size
7.3 MB
Stars
29K
Age
8y
Commits · 90 Days