a new state, or the initial state if nothing was modified
The produce
function takes a value and a "recipe function" (whose
return value often depends on the base state). The recipe function is
free to mutate its first argument however it wants. All mutations are
only ever applied to a copy of the base state.
Pass only a function to create a "curried producer" which relieves you from passing the recipe function every time.
Only plain objects and arrays are made mutable. All other objects are considered uncopyable.
Note: This function is bound to its Immer
instance.
a new state, or the initial state if nothing was modified
The produce
function takes a value and a "recipe function" (whose
return value often depends on the base state). The recipe function is
free to mutate its first argument however it wants. All mutations are
only ever applied to a copy of the base state.
Pass only a function to create a "curried producer" which relieves you from passing the recipe function every time.
Only plain objects and arrays are made mutable. All other objects are considered uncopyable.
Note: This function is bound to its Immer
instance.
a new state, or the initial state if nothing was modified
The produce
function takes a value and a "recipe function" (whose
return value often depends on the base state). The recipe function is
free to mutate its first argument however it wants. All mutations are
only ever applied to a copy of the base state.
Pass only a function to create a "curried producer" which relieves you from passing the recipe function every time.
Only plain objects and arrays are made mutable. All other objects are considered uncopyable.
Note: This function is bound to its Immer
instance.
a new state, or the initial state if nothing was modified
The produce
function takes a value and a "recipe function" (whose
return value often depends on the base state). The recipe function is
free to mutate its first argument however it wants. All mutations are
only ever applied to a copy of the base state.
Pass only a function to create a "curried producer" which relieves you from passing the recipe function every time.
Only plain objects and arrays are made mutable. All other objects are considered uncopyable.
Note: This function is bound to its Immer
instance.
a new state, or the initial state if nothing was modified
The produce
function takes a value and a "recipe function" (whose
return value often depends on the base state). The recipe function is
free to mutate its first argument however it wants. All mutations are
only ever applied to a copy of the base state.
Pass only a function to create a "curried producer" which relieves you from passing the recipe function every time.
Only plain objects and arrays are made mutable. All other objects are considered uncopyable.
Note: This function is bound to its Immer
instance.
a new state, or the initial state if nothing was modified
The produce
function takes a value and a "recipe function" (whose
return value often depends on the base state). The recipe function is
free to mutate its first argument however it wants. All mutations are
only ever applied to a copy of the base state.
Pass only a function to create a "curried producer" which relieves you from passing the recipe function every time.
Only plain objects and arrays are made mutable. All other objects are considered uncopyable.
Note: This function is bound to its Immer
instance.
a new state, or the initial state if nothing was modified
The produce
function takes a value and a "recipe function" (whose
return value often depends on the base state). The recipe function is
free to mutate its first argument however it wants. All mutations are
only ever applied to a copy of the base state.
Pass only a function to create a "curried producer" which relieves you from passing the recipe function every time.
Only plain objects and arrays are made mutable. All other objects are considered uncopyable.
Note: This function is bound to its Immer
instance.
a new state, or the initial state if nothing was modified
The
produce
function takes a value and a "recipe function" (whose return value often depends on the base state). The recipe function is free to mutate its first argument however it wants. All mutations are only ever applied to a copy of the base state.Pass only a function to create a "curried producer" which relieves you from passing the recipe function every time.
Only plain objects and arrays are made mutable. All other objects are considered uncopyable.
Note: This function is bound to its
Immer
instance.