In a React Router application it’s very common to want to render a default set of components on every route, such as a header and footer:
In the latest version of React Router it is very easy to achieve this, as well as creating child layouts for specific use cases.
Creating a default layout
The default layout is where components used on every page of our app will exist. React router offers a
render prop which will be called when the route matches:
This is useful because we can wrap a component around the
... read the whole story at simonsmith.io.
<Route /> and control where our component is rendered whilst allowing all the usual props to be