const { produce } = require("immer"); const outer = produce((draft) => { return inner(draft); }, {}); const inner = produce((draft) => { draft.