Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tanyaisinmybed/effector-undo
Simple undo/redo functionality for effector
https://github.com/tanyaisinmybed/effector-undo
Last synced: 3 months ago
JSON representation
Simple undo/redo functionality for effector
- Host: GitHub
- URL: https://github.com/tanyaisinmybed/effector-undo
- Owner: tanyaisinmybed
- Created: 2019-04-03T19:37:43.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-12-17T19:00:25.000Z (almost 5 years ago)
- Last Synced: 2024-05-11T23:02:48.543Z (6 months ago)
- Language: TypeScript
- Size: 11.7 KB
- Stars: 13
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
Awesome Lists containing this project
README
# effector-undo
Simple undo/redo functionality for effector
Example
```javascript
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
});
```[codesandbox](https://codesandbox.io/s/x7q86y58oq)