StateReconstructor
object StateReconstructor
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