With React
Installation
Install module `react-router5:
Demos and examples
Provider
RouterProvider: adds your router instance and router state in context.
Connecting components
You can connect your components using three different methods:
Higher-order components:
withRouter
,withRoute
androuteNode
Render props:
Router
,Route
andRouteNode
Hooks:
useRouter
,useRoute
anduseRouteNode
Link components
Link: a component to render hyperlinks. For a full list of supported props, check the source!
Link
iswithRoute
andLink
composed togetherConnectedLink: same as
Link
, except it re-renders on a route changes.
Last updated