1.0.5 • Published 2 years ago
@jswork/next-url-watcher v1.0.5
next-url-watcher
Observe url changes for next.
installation
npm install -S @jswork/next-url-watcher
apis
api | params | description |
---|---|---|
init | ({ interval, immediate }) | Initial a nx class. |
watch | callback | Watch url change. |
usage
import NxUrlWatcher from '@jswork/next-url-watcher';
const wather = new NxUrlWatcher({ immediate: true });
wather.watch((old, current) => {
console.log(old, current);
});
license
Code released under the MIT license.