Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/rishabharoraa/react-use-history-state


https://github.com/rishabharoraa/react-use-history-state

Last synced: 13 days ago
JSON representation

Awesome Lists containing this project

README

        

**Install**

```bash
npm install react-use-history-state
```

**Quickstart**

```tsx
export default function App() {
const [state, setState, history] = useHistoryState(5, 1000);

useEffect(() => {
setState(5);
setState(4);
setState(3);
}, []);

return (


{history.map((elem: number) => (

{elem}


))}

);
}
```