add inline rendering prop to app component

This commit is contained in:
Jake McDermott
2019-01-02 01:40:44 -05:00
parent f2760ed91c
commit a023df2c17
2 changed files with 60 additions and 63 deletions

View File

@@ -235,6 +235,21 @@ export async function main () {
],
},
]}
render={({ routeGroups }) => (
routeGroups
.reduce((allRoutes, { routes }) => allRoutes.concat(routes), [])
.map(({ component: PageComponent, path }) => (
<Route
key={path}
path={path}
render={({ match }) => (
<PageComponent
match={match}
/>
)}
/>
))
)}
/>
)}
/>