framework7
framework7 copied to clipboard
Next.js - master detail routes didn't render in server side
Describe the bug
Next.js : Master detail routes didn't render in the server
To Reproduce
Steps to reproduce the behavior:
- Clone https://github.com/framework7io/framework7-nextjs-starter
- Replace router.js code into below
/*
- Routes involved in Next.js routing (main pages) should be used as "asyncComponent"
- Routes involved in other Framework7 routers (in Views other than main View) should be imported and used directly as "component"
*/
import LeftPanel from './pages/left-panel';
// App routes
export const routes = [
{
path: "/about",
asyncComponent: () => import("./pages/about"),
master: true,
// detail routes
detailRoutes: [
{
path: "/",
asyncComponent: () => import("./pages/index"),
},
],
},
{
path: "/left-panel",
component: LeftPanel,
},
{
path: '/blog/:postId',
asyncComponent: () => import('./pages/blog/[postId]'),
}
];
Then,
- Create a master detail route
- Click on view source
Expected behavior
master detail pages should also be render on the server
Actual Behavior
master detail pages didn't render in server side
Screenshots
If applicable, add screenshots to help explain your problem.

Master detail code didn't render in server

Yes, right now it is kind of a limitation. Will mark it as feature request