The Component renders children when current location matches the route’s path.
Component Route
renders children when current location matches the route’s path.
It passes matched parameters as props to the rendered children.
It has all props of Match Component and:
The duration of the transition, in milliseconds.
Default: 0
The function maps routed components props.
Default: props => props
Fired on route update
Fired on direction
is DIRECTION_ENTER
and status
is STATUS_START
Fired on direction
is DIRECTION_ENTER
and status
is STATUS_ACTIVE
Fired on direction
is DIRECTION_ENTER
and status
is STATUS_DONE
Fired on direction
is DIRECTION_EXIT
and status
is STATUS_START
Fired on direction
is DIRECTION_EXIT
and status
is STATUS_ACTIVE
Fired on direction
is DIRECTION_EXIT
and status
is STATUS_DONE
import React from 'react';
import { render } from 'react-dom';
import { Steersman, Route, createBrowserHistory } from 'react-steersman';
const history = createBrowserHistory();
render(
<Steersman history={history}>
<Route path="/" children={() => 'Home'} />
<Route path="/profile" children={() => 'Profile'} />
<Route path="/dashboard" children={() => 'Dashboard'} />
</Steersman>,
document.getElementById('app')
);