I\'d like to render some of my routes within my public layout, and some other routes within my private layout, is there a clean way to do this?
Example that obviousl
What I have done for this is create a simple component that adds an extra property to the Route component which is layout:
function RouteWithLayout({layout, component, ...rest}){
return (
React.createElement( layout, props, React.createElement(component, props))
}/>
);
}
Then in your case your routes would look like this