Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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 (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-05-20T17:10:16.000Z (over 5 years ago)
- Last Synced: 2024-09-19T13:21:44.470Z (4 months ago)
- Topics: navigation, observer, route
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/uon
- Size: 6.84 KB
- Stars: 84
- Watchers: 3
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Update On Navigate (uon)
[![npm version](https://img.shields.io/npm/v/uon.svg)](https://www.npmjs.com/package/uon)
[![gzip size](http://img.badgesize.io/https://unpkg.com/uon/dist/uon.mjs?compression=gzip)](https://unpkg.com/uon)
[![license](https://img.shields.io/npm/l/uon.svg)](https://github.com/vaneenige/uon/blob/master/LICENSE)
[![dependencies](https://img.shields.io/badge/dependencies-none-ff69b4.svg)](https://github.com/vaneenige/uon/blob/master/package.json)
[![TypeScript](https://img.shields.io/static/v1.svg?label=&message=TypeScript&color=294E80)](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