Simple undo/redo functionality for effector
Example
import { createHistory } from "@tanyaisinmybed/effector-undo";
export const { undo, redo, clear } = createHistory({
store: counter,
limit: 10,
events: [inc, dec],
filter: (lastState, state) => state - lastState > 3,
debug: true
});