ποΈ create()
Use create() for draft mutation to get a new state, which also supports currying.
ποΈ apply()
Use apply() for applying patches to get the new state.
ποΈ makeCreator()
makeCreator() only takes options as the first argument, resulting in a custom create() function.
ποΈ current()
Get the current value from a draft.
ποΈ original()
Get the original value from a draft.
ποΈ rawReturn()
For return values that do not contain any drafts, you can use rawReturn() to wrap this return value to improve performance. It ensure that the return value is only returned explicitly.
ποΈ unsafe()
When strict mode is enabled, mutable data can only be accessed using unsafe().
ποΈ isDraftable()
Check if a value is draftable
ποΈ isDraft()
Check if a value is a draft.
ποΈ markSimpleObject()
markSimpleObject() is a mark function that marks all objects as immutable.