Navigator
react-router

Navigator interface

A Navigator is a "location changer"; it's how you get to different locations.

Every history instance conforms to the Navigator interface, but the distinction is useful primarily when it comes to the low-level <Router> API where both the location and a navigator must be provided separately in order to avoid "tearing" that may occur in a suspense-enabled app if the action and/or location were to be read directly from the history instance.

Properties

createHref

Type: { }

encodeLocation

Type: { }

go

Type: { }

Methods

push

Type: push(to, state, opts): void

replace

Type: replace(to, state, opts): void

Docs and examples CC 4.0