https://github.com/qzruncode/simple-history
simple history for browser
https://github.com/qzruncode/simple-history
Last synced: 9 months ago
JSON representation
simple history for browser
- Host: GitHub
- URL: https://github.com/qzruncode/simple-history
- Owner: qzruncode
- Created: 2022-02-19T13:13:31.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-04-30T14:26:58.000Z (about 4 years ago)
- Last Synced: 2025-09-19T04:25:09.505Z (10 months ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://www.npmjs.com/package/simple-history)
[](https://www.npmjs.com/package/simple-history)
## simple-history
```
import SimpleHistory from 'simple-history'
const id = SimpleHistory.listen((action, preUrl, location) => {
console.log(action, preUrl, location)
})
SimpleHistory.unlisten(id)
SimpleHistory.push(url, state)
SimpleHistory.replace(url, state)
SimpleHistory.go(n)
SimpleHistory.back()
SimpleHistory.forward()
```