Skip to content

GabrielModog/useTimeMachine

Repository files navigation

⏲️ 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!

About

⏲️ Go forward and backwards with your state.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published