Here’s the example Router code we ended up with in the 2020-12-15 core meeting:
const DarkLayout = (props) => {
return <AppLayout {...props} theme="dark" />
}
<Router>
<Set wrap={[MarketingLayout, HeaderLayout]}>
<Route path="/home" page={HomePage} />
<Route path="/pricing" page={PricingPage} />
</Set>
<Private unauthenticated="home">
<Set wrap={[AdminContext, DarkLayout]}>
<Route path="/admin/users" page={UsersPage} />
<Route path="/admin/posts" page={PostsPage} />
</Set>
<Set wrap={(props) => <AppLayout {...props} theme="light" />}>
<Route path="/utility" page={UtilityPage} />
</Set>
</Private>
<Route notfound={NotFoundPage} />
</Router>