Interface Location

A location contains information about the URL path and history state.

interface Location {
    hash: string;
    pathname: string;
    searchParams: Dict;
    state?: any;
}

Properties

hash: string

A decoded URL fragment identifier without a #.

pathname: string

A URL pathname.

searchParams: Dict

URL search params represented as an object.

state?: any

An arbitrary data associated with the location.