Deterministically re-apply a Recording against the given action map.
Pure: the result depends only on recording and actions. Throws if the recording references an action that's not in actions (a version mismatch).
recording
actions
const final = replay(recording, actions); Copy
const final = replay(recording, actions);
const stateAt5 = replay(recording, actions, { until: 5 }); Copy
const stateAt5 = replay(recording, actions, { until: 5 });
const history: State[] = [recording.initialState];replay(recording, actions, { onTick: (s) => history.push(s) }); Copy
const history: State[] = [recording.initialState];replay(recording, actions, { onTick: (s) => history.push(s) });
Deterministically re-apply a Recording against the given action map.
Pure: the result depends only on
recordingandactions. Throws if the recording references an action that's not inactions(a version mismatch).