Store API with temporal state access for undo/redo.
Call the store as a function to use it as a hook.
Call with a selector to subscribe to a slice of state.
Get current state snapshot without subscribing.
Update state imperatively (not recommended in React).
Subscribe to state changes.
Access to temporal (undo/redo) state.
Store API with temporal state access for undo/redo.