Last active
March 5, 2021 15:51
-
-
Save nolimits4web/e0a890297e9318d13b71cc4e533f4bf2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ... | |
// 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