v21’s avatarv21’s Twitter Archive—№ 65,086

  1. …in reply to @lorenschmidt
    @lorenschmidt this sounds sensible as an approach. depending on how large your state is, you might be able to get away with just storing the full state at each step. or you might be able to find some automatic, CS-y way of deriving the deltas automatically.
    1. …in reply to @v21
      @lorenschmidt might want to manually set what counts as a single "action" - making a single step of the undo correspond to user intent might get messy
      1. …in reply to @v21
        @lorenschmidt something like this to derive the deltas: json-delta.readthedocs.io/en/latest/ (assuming your current state is all contained in a single object)