route-changed

1.0.2 • Public • Published

Route-changed

Build Status

🛤️🛣️ A better way to listen for url changes.

Install

$ npm install route-changed

Usage

const routeChanged = require('route-changed');
 
routeChanged((url) => {
  // The url changed
  console.log(url);
});

API

routeChanged(cb, url)

cb

Type: function

Will be executed when the url changes.

url

Type: function

An optional function that should return a url-String.

License

MIT © Tobias Herber

Package Sidebar

Install

npm i route-changed

Weekly Downloads

3

Version

1.0.2

License

MIT

Unpacked Size

2.7 kB

Total Files

4

Last publish

Collaborators

  • tobihrbr