Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rishabharoraa/react-use-history-state
https://github.com/rishabharoraa/react-use-history-state
Last synced: 13 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/rishabharoraa/react-use-history-state
- Owner: rishabharoraa
- License: mit
- Created: 2023-04-29T07:53:37.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-04-29T20:29:05.000Z (over 1 year ago)
- Last Synced: 2024-08-08T19:55:42.878Z (5 months ago)
- Language: TypeScript
- Size: 12.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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}
))}
);
}
```