{
const baseState = {
foo: "bar",
list: [{ text: "coding" }]
};
const state = mutative.create(
baseState,
(draft) => {
draft.list.push({ text: "learning" });
},
{ enablePatches: false, mark: mutative.markSimpleObject }
);
baseState.foo = "baz";
baseState.list[0].text = "programming";
return state;
}