I am playing around with immer.js. Immer.js lock obejct after giving new instance. Is it ok to use this locked object as global state?
windows.initialState = {a: 'a'};
const nextState = produce(initialState , draftState => {
draftState.a = 'b',
});
windows.initialState = nextState;