Location
react-router

Location interface

An entry in a history stack. A location contains information about the URL path, as well as possibly some arbitrary state and a key.

Properties

hash

Type: string

A URL fragment identifier, beginning with a #.

key

Type: string

A unique string associated with this location. May be used to safely store and retrieve data in some other storage API, like localStorage.

Note: This value is always "default" on the initial location.

pathname

Type: string

A URL pathname, beginning with a /.

Type: string

A URL search string, beginning with a ?.

state

Type: State

A value of arbitrary data associated with this location.

Docs and examples CC 4.0