Skip to content

Instantly share code, notes, and snippets.

@nolimits4web
Last active March 5, 2021 15:51
Show Gist options
  • Save nolimits4web/e0a890297e9318d13b71cc4e533f4bf2 to your computer and use it in GitHub Desktop.
Save nolimits4web/e0a890297e9318d13b71cc4e533f4bf2 to your computer and use it in GitHub Desktop.
// ...
// move our routes array out of component
const routes = [
{
path: '/',
asyncComponent: () => import('./index'),
},
// add dynamic Framework7 route to ./blog/[postID].js page
{
path: '/blog/:postID',
asyncComponent: () => import('./blog/[postID]'),
}
]
function MyApp({ Component, pageProps }) {
// ...
return (
<App url={url} routes={routes}>
{/* ... */}
</App>
);
}
export default MyApp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment