Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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)