Immer

A small JavaScript library that lets you write update code as if mutating an object, while it produces a new immutable copy for you.

In more detail

Immer gives you a draft object; after your function finishes it creates the next state with only the changed parts copied. It makes deeply nested React state updates shorter and less error-prone.

Related terms

Taught in

References