Nav
Classes¶
default¶
A Nav component for browsers. It handles changine the browser history,
deciding which page component to render based on a passed mapping, and
passes a navigateTo
to all page components.
Extends¶
Component
\<Props
,State
>
Methods¶
navigateTo()¶
navigateTo(
path
:string
,options
: {action
:SuggestedAction
;ownProps
:Record
\<string
,unknown
>; }):boolean
Passed to every page component. Manually navigate using pages that exists
in the store and restores scroll position. This is what Visit in
your application_visit.js
ultimately calls.
If there is an existing page in your store navigateTo
will restore the props,
render the correct component, and return true
. Otherwise, it will return
false
. This is useful if you want to restore an existing page before making a
call to visit
or remote
.
Parameters¶
Parameter | Type | Description |
---|---|---|
path |
string |
|
options |
object |
when none , immediately returns false |
options.action |
SuggestedAction |
- |
options.ownProps |
Record \<string , unknown > |
- |
Returns¶
boolean
true
if the navigation was a success, false
if the page was not found in the
store.