
Introduction to Immer | Immer - GitHub Pages
Immer (German for: always) is a tiny package that allows you to work with immutable state in a more convenient way. Immer is life-changing as a JS dev, and I'm not even exaggerating :) Like, it's right up there with Prettier in terms of "wow this package is amazing, how did I ever live without it?" --Mark Erikson, (the) Redux Maintainer, @replayio.
immer - npm
Create your next immutable state by mutating the current one. Latest version: 10.1.1, last published: a year ago. Start using immer in your project by running `npm i immer`. There are 5403 other projects in the npm registry using immer.
Immer 入门 | Immer - GitHub Pages
Immer(德语为:always)是一个小型包,可让您以更方便的方式使用不可变状态。 Immer 可以在需要使用不可变数据结构的任何上下文中使用。 例如与 React state、React 或 Redux reducers 或者 configuration management 结合使用。 不可变的数据结构允许(高效)的变化检测:如果对对象的引用没有改变,那么对象本身也没有改变。 此外,它使克隆对象相对便宜:数据树的未 …
Using TypeScript or Flow | Immer - GitHub Pages
The Immer package ships with type definitions inside the package, which should be picked up by TypeScript and Flow out of the box and without further configuration. The TypeScript typings automatically remove readonly modifiers from your draft types and return a value that matches your original type.
GitHub - immerjs/immer: Create the next immutable state by …
Winner of the "Breakthrough of the year" React open source award and "Most impactful contribution" JavaScript open source award in 2019. You can use Gitpod (a free online VS Code like IDE) for contributing online. With a single click it will launch a workspace and automatically: clone the immer repo. install the dependencies. run yarn run start.
immer - GitHub
Create the next immutable state tree by simply modifying the current tree - immer
Introducing Immer: Immutability the easy way - Medium
2018年1月10日 · Immer works by writing producers, and the simplest producer possible looks like this: The produce function takes two arguments. The currentState and a producer function. The current state...
Immer and Immutable.js: How do they compare? - LogRocket Blog
2021年1月12日 · Immer is one of the many immutability libraries out there that you can use in your application. According to its official website, Immer is based on the copy-on-write mechanism. The whole idea revolves around applying changes to a temporary draftState, which serves as a proxy to the current state.
Writing Reducers with Immer | Redux Toolkit - JS.ORG
2024年9月2日 · Immer is a library that simplifies the process of writing immutable update logic. Immer provides a function called produce, which accepts two arguments: your original state, and a callback function. The callback function is given a "draft" version of that state, and inside the callback, it is safe to write code that mutates the draft value.
Installation | Immer - GitHub Pages
Immer can be installed as a direct dependency, and will work in any ES5 environment: ⚠️ When using a CDN, it is best to check the url in your browser and see what version it resolves to, so that your users aren't accidentally served a newer version in the future when updates are release.
- 某些结果已被删除