Repository navigation
Replies: 3 comments
|
I tried it the tsx-way and it is ok.
|
0 replies
|
Examples: JSX-bases (ok): https://playcode.io/1335544 Config based (not work): https://playcode.io/1335586 |
0 replies
|
I'm also experiencing an issue with the config router using children property. I'm using an absolute path for the base in Vite so my prod build works but I've also tried relative with no luck. In my case, the nested route in the I would love for that to work but as a workaround you can define the children as top level with the full path name: // Working for me
{
path: "/:entity",
component: lazy(() => import("./pages/Profile")),
},
{
path: "/:entity/reports",
component: lazy(() => import("./pages/Profile/UserReports")),
},
{
path: "/:entity/projects",
component: lazy(() => import("./pages/Profile/UserProjects")),
},
// Broken
{
path: "/:entity",
component: lazy(() => import("./pages/Profile")),
children: [
{
path: "/reports",
component: lazy(() => import("./pages/Profile/UserReports")),
},
{
path: "/projects",
component: lazy(() => import("./pages/Profile/UserProjects")),
},
]
}
|
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I misunderstand something, or have a problem in my code, or does this not work with config based routing?
Simple example:
Output when you view
/Output when you view
/pageExpected output when you click
link to contentor open route/page/contentin the browser urlBut Content from is not visible.
app.tsxpage.tsxI can view page
/I can view
/pageI see
link to contentWhen i click
link to contentthe url changes to/page/contentI see still
link to contentBut no content is visible
What i am doing wrong?
All reactions