uon
TypeScript icon, indicating that this package has built-in type declarations

1.2.1 • Public • Published

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

Package Sidebar

Install

npm i uon

Weekly Downloads

1

Version

1.2.1

License

MIT

Unpacked Size

4.32 kB

Total Files

7

Last publish

Collaborators

  • vaneenige