StateReconstructor
Deprecated
KeyframedReconstructor answers the same question and keeps keyframes, so stepping through a long session does not replay it from the start each time.
Replace with
import io.github.syrou.reaktiv.introspection.protocol.KeyframedReconstructor
Content copied to clipboard
KeyframedReconstructor(initialStateJson, actions).stateAt(index)Content copied to clipboard
Reconstructs full state from an initial state snapshot and sequential module-level deltas.
Each action captures only the changed module's state (a delta). Full state at any point can be reconstructed by starting from the initial state and applying deltas sequentially.
Usage:
val fullState = StateReconstructor.applyDelta(currentStateJson, "CounterModule", deltaJson)
val stateAtIndex = StateReconstructor.reconstructAtIndex(initialStateJson, actions, 5)Content copied to clipboard