https://github.com/vaneenige/uon
🐨 A tiny 200b route change observer.
https://github.com/vaneenige/uon
navigation observer route
Last synced: about 2 months ago
JSON representation
🐨 A tiny 200b route change observer.
- Host: GitHub
- URL: https://github.com/vaneenige/uon
- Owner: vaneenige
- License: mit
- Created: 2019-01-22T21:05:42.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-05-20T17:10:16.000Z (about 6 years ago)
- Last Synced: 2025-04-23T00:43:24.514Z (about 2 months ago)
- Topics: navigation, observer, route
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/uon
- Size: 6.84 KB
- Stars: 84
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Update On Navigate (uon)
[](https://www.npmjs.com/package/uon)
[](https://unpkg.com/uon)
[](https://github.com/vaneenige/uon/blob/master/LICENSE)
[](https://github.com/vaneenige/uon/blob/master/package.json)
[](https://www.typescriptlang.org/)Update On Navigate (uon) is a tiny library that observes route changes and delivers updates through a callback.
#### Features:
- Small in size, no dependencies
- Observe native navigation
- Observe manual navigation## Install
```
$ npm install --save uon
```## Usage
```js
// Import the library
import uon from 'uon';// Observe route changes
uon((route) => { ... });
```
> The returned route will be the current pathname.## License
MIT © Colin van Eenige