route-changed
v1.0.2
Published
Listen for url changes
Downloads
12
Maintainers
Readme
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