vaneenige / uon

🐨 A tiny 200b route change observer.

Home Page:https://www.npmjs.com/package/uon

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Update On Navigate (uon)

npm version gzip size license dependencies TypeScript

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

// 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

About

🐨 A tiny 200b route change observer.

https://www.npmjs.com/package/uon

License:MIT License


Languages

Language:TypeScript 100.0%