0.1.4 • Published 1 year ago
use-time-machine v0.1.4
⏲️ useTimeMachine
A simple React.js hook to go forward and backwards with your state.
Install now
yarn add use-time-machine
or
npm i use-time-machine
Samples
import { useTimeMachine } from "use-time-machine"
function App(){
const {history, sendTo, hasPast, hasFuture} = useTimeMachine([...]);
return <div>...</div>
}
import { useHistoryMachine } from 'use-time-machine';
function App() {
const { state, setCurrentState, goFoward, goBackward, resetState } =
useHistoryMachine('test');
return <div>...</div>;
}
by @GabrielModog - say hi!