<h1 align="center"> <img src="https://svgshare.com/i/9Ff.svg" alt="Use Events" /> </h1>
npm install use-simple-undo!npm
!npm
!npm bundle size (minified + gzip)
!NpmLicense
Use Simple Undo - Simple solution to handle undo\redo turned into React Hooks.
Read about Hooks feature.
https://sandiiarov.github.io/use-simple-undo
> Note: React 16.8+ is required for Hooks.
``sh`
npm i use-simple-undo
`sh`
yarn add use-simple-undo
`jsx`
import useSimpleUndo from 'use-simple-undo';
`jsx
const Counter = () => {
const [state, cursor, setValue, { undo, redo }] = useSimpleUndo(0);
const value = state[cursor];
const increment = () => setValue(value + 1);
const decrement = () => setValue(value - 1);
return (
<>