Description
In React, using an Immutable state enables quick and cheap comparison of the state tree before and after a change. As a result, each component decides whether to re-rendered or not before performing…
Summary
- Using Immer with React: What is Immer and How It Works Immer is a small library created to help developers with immutable state based on a copy-on-write mechanism, a technique used to implement a copy operation on modifiable resources.
- You might get the feeling that Immer is complicating your code if you are working with simple states.
- But, Immer becomes very useful when it comes to handling more complex data.