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
Update: I solved it another way, but if forces you to namespace the different parts of your app with /app or /admin for example.
Each of the components UserRoutes, AdminRoutes and PublicRoutes are basically large Switch components with the specific layout at its root.
Here's how it looks:
} />
} />
} />
Old: One solution would be to use the render prop of each Route, but it seems really cumbersome:
}
/>
}
/>
}
/>
}
/>