1.0.2 • Published 6 years ago
route-changed v1.0.2
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