location-changed

0.4.0 • Public • Published

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.

/location-changed/

    Package Sidebar

    Install

    npm i location-changed

    Weekly Downloads

    2

    Version

    0.4.0

    License

    MIT

    Unpacked Size

    3.85 kB

    Total Files

    4

    Last publish

    Collaborators

    • mjstahl