MCPcopy Index your code
hub / github.com/immerjs/immer / initialStateFactory

Function initialStateFactory

__tests__/base.js:3758–3771  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3756
3757 it(`Something with nested producers #522 ${name}`, () => {
3758 function initialStateFactory() {
3759 return {
3760 substate: {
3761 array: [
3762 {id: "id1", value: 0},
3763 {id: "id2", value: 0}
3764 ]
3765 },
3766 array: [
3767 {id: "id1", value: 0},
3768 {id: "id2", value: 0}
3769 ]
3770 }
3771 }
3772
3773 const globalProducer = produce(draft => {
3774 draft.substate = subProducer(draft.substate)

Callers 1

runBaseTestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…