Layered nested routes not working? #443
-
I've been using solid-start, and its filesystem routing is working well. Today, I tried using the router library directly, and discovered that the layered nested routing from the README isn't working correctly. This might be a problem with my setup, but my code is fairly simple, copied directly from the README: const App: Component = () => {
return (
<div class={styles.App}>
<h2>Nest Router</h2>
<main>
<Router>
<Route
path="/"
component={(props) => <div>Onion starts here {props.children}</div>}
>
<Route
path="layer1"
component={(props) => <div>Another layer {props.children}</div>}
>
<Route path="layer2" component={() => <div>Innermost layer</div>}>
{" "}
</Route>
</Route>
</Route>
</Router>
</main>
</div>
);
}; This code doesn't render anything in the routing section. I'm not sure if I'm setting things up incorrectly or if there's a bug in the router library. Context {
"devDependencies": {
"solid-devtools": "^0.29.2",
"typescript": "^5.3.3",
"vite": "^5.0.11",
"vite-plugin-solid": "^2.8.2"
},
"dependencies": {
"@solidjs/router": "^0.13.5",
"solid-js": "^1.8.11"
}
}
|
Beta Was this translation helpful? Give feedback.
Answered by
Brendonovich
Jun 9, 2024
Replies: 1 comment
-
#445 will fix the formatting so that the example works |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
ryansolid
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
#445 will fix the formatting so that the example works