id | title |
---|---|
freezing |
Auto freezing |
egghead.io lesson 7: Immer automatically freezes data
Immer automatically freezes any state trees that are modified using produce
. This protects against accidental modifications of the state tree outside of a producer. In most cases this provides the most optimal behavior, but setAutoFreeze(true / false)
can be used to explicitly turn this feature on or off.
Immer will never freeze (the contents of) non-enumerable, non-own or symbolic properties, unless their content was drafted.
freeze
utility.