-
In react router, I can do something like this: {
path: '',
element: <AuthenticatedRoutes/>,
children: [
{
path: '',
element: <MainLayout/>,
children: [
{
path: '/a',
element: <A />
},
{
path: '/b',
element: <B />
}
]
},
{
path: '',
element: <AnotherLayout/>,
children: [
{
path: '/c',
element: <C />
},
{
path: '/d',
element: <D />
}
]
}
]
} I try to create something similar with file-based routing
But It return empty white page when I'm navigate to /a and /b and /thisWillWork still work. Is there any way to achieve this with current version of tanstack router? If no, is there any workaround for this? Thanks a lot. |
Beta Was this translation helpful? Give feedback.
Answered by
johnx888
Nov 6, 2024
Replies: 1 comment 1 reply
-
can you please provide a complete minimal example, e.g. by forking one of the existing router examples (e.g. https://tanstack.com/router/v1/docs/framework/react/examples/basic-file-based) ? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sorry for bothering you guys. It turned out to be my silly mistake; I accidentally deleted the return statement in my MainLayout file. I realize this when forking that example and reproducing it.