Here is a screenshot from their docs about component
state
do they mean? A Redux
state?
The the state
property of the to
prop is the param of pushState
method of History
DOM object described here
That props used in push
/replace
methods of router as described here for transitions to a new URL, adding a new entry in the browser history like this:
router.push('/users/12')
// or with a location descriptor object
router.push({
pathname: '/users/12',
query: { modal: true },
state: { fromDashboard: true }
})
It also mentioned here:
router.push(path)
router.push({ pathname, query, state }) // new "location descriptor"
router.replace(path)
router.replace({ pathname, query, state }) // new "location descriptor"