Nighttime Peanut Migrations
Miss any of our Open RFC calls?Watch the recordings here! »

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

Install

npm i route-changed

DownloadsWeekly Downloads

1

Version

1.0.2

License

MIT

Unpacked Size

2.7 kB

Total Files

4

Last publish

Collaborators

  • avatar