Search...
An optional alternative to the immer's produce method, but it requires pure objects as the initial state and does not support circular references.
import { produce } from '@shined/reactive'; produce(state, producer); // Usage example const state = { count: 0 }; const nextState = produce(state, draft => { draft.count += 1; }); console.log(nextState.count); // 1