Location Changed
Observe and programmatically change the browser's location
Installation
$ npm install --save location-changed
import locationChange from 'location-changed'
Example
import locationChange from 'location-changed'
// current route is '/hello'
const observable = locationChange((path) => {
console.log(path) // -> /hello?name=Mark
})
observable.path = '/hello?name=Mark'
Attribution
Most of the heavy lifting is provided by libraries written by @sindresorhus and @WebReflection.