urlobject with the following structure:
params- object with url params
path- Full path string
query- Parsed object from query string
onthat we've already seen, router provides a few additional methods and configuration options.
history. To configure router for a different mode, assign a new value to it:
`on(route, handlerFunction, persist)`
persistargument will prevent a handler from flushing if
Router.onwill return a string ID which you can use to remove handlers later if needed. Usage:
'/', mode to
'hash'and all route handlers are removed (even persisted ones).
<Route />component to do that:
Routealso supports passing a `component` prop for render. If you do this, rendered component will automatically be routerized. You can bypass this behavior by using
FancyHeadercomponent on route
this.props.router, but the one on
Routeris an instance of a
WCRouterclass, which you can reuse or extend.
skipInitial- If this is set, router won't fire handlers on initial page load.
mode- Set default mode. Can be
root- Set custom default root
@routerizedecorator uses default router instance. If you want to routerize your component with your custom router, you can use
<Route />component by providing it as a