Link
The Link component is used to navigate around. It has all the same properties as the native anchor element, and a few additional ones.
import { Link } from 'react-sprout';
Additional properties
- Name
relative
- Type
- boolean
- Type
- true
- Description
A boolean indicating whether the href url is relative to the route.
- Name
push
- Type
- boolean
- Description
A boolean indicating whether a new entry in the history stack should be pushed.
- Name
replace
- Type
- boolean
- Description
A boolean indicating whether the current entry in the history stack should be replaced.
- Name
title
- Type
- string
- Description
The document title after navigation.
- Name
state
- Type
- any
- Description
The history state after navigation.
- Name
data
- Type
- any
- Description
The data of the navigation to be used as search parameters
- Name
sticky
- Type
- boolean
- Type
- false
- Description
A boolean indicating whether the navigation is sticky.
- Name
reload
- Type
- boolean
- Type
- false
- Description
A boolean indicating whether to reload all data for the navigation.
- Name
cache
- Type
- boolean
- Type
- false
- Description
A boolean indicating whether the current page should be kept in the back/forward cache.
- Name
onNavigate
- Type
- function
- Description
A callback that is invoked when a navigation is initiated.
- Name
onCanceled
- Type
- function
- Description
A callback that is invoked when a navigation is canceled.
- Name
onNavigateStart
- Type
- function
- Description
A callback that is invoked when a navigation is not canceled.
- Name
onAborted
- Type
- function
- Description
A callback that is invoked when a navigation is aborted.
- Name
onNavigateEnd
- Type
- function
- Description
A callback that is invoked when a navigation is finished.