You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
📋 Description of content that is out-of-date or incorrect
I'm learning how to use Solid Router by stepping through the Learnmaterials in order. My goal is to build something like this:
<nav><ahref="/">Home</a><ahref="/about">About</a></nav><!-- Home or About component gets loaded here -->
The Getting started > Component routing section says to make the root of your app <Router> and then nest <Route>s inside it.
However, just below that in Concepts > Navigation the code snippets have an <App> for a root and don't mention <Router>. So I don't understand where the contents of my app should be in relation to the <Router>, especially layout stuff that is external to the route being loaded.
Uncaught Error: <A> and 'use' router primitives can be only used inside a Route.
Can anyone help me understand how to achieve this, or point me to a working example of loading routes via links? I'm happy to submit a PR to make the docs a bit clearer to newbies like myself 😄
🖥️ Reproduction in StackBlitz (if reporting incorrect content or code samples)
No response
The text was updated successfully, but these errors were encountered:
Someone kindly answered my question over on Discord about how to get started with Router. They created this StackBlitz example with the setup I was going for. Minus the imports and exports, it looks like this:
To be honest I'm still confused by how this works, especially MetaProvider and why it would contain anchor tags, but that may be something to keep chatting about on Discord.
In terms of documentation, I think it would be really helpful to have a fully working example like this at the very top of the Router docs, like a quickstart. Just my two cents as a newbie! 😄
📚 Subject area/topic
/solid-router/concepts/navigation.mdx
📋 Page(s) affected (or suggested, for new content)
https://docs.solidjs.com/solid-router/concepts/navigation
📋 Description of content that is out-of-date or incorrect
I'm learning how to use Solid Router by stepping through the Learn materials in order. My goal is to build something like this:
The Getting started > Component routing section says to make the root of your app
<Router>
and then nest<Route>
s inside it.However, just below that in Concepts > Navigation the code snippets have an
<App>
for a root and don't mention<Router>
. So I don't understand where the contents of my app should be in relation to the<Router>
, especially layout stuff that is external to the route being loaded.I tried this:
And am getting this error:
Can anyone help me understand how to achieve this, or point me to a working example of loading routes via links? I'm happy to submit a PR to make the docs a bit clearer to newbies like myself 😄
🖥️ Reproduction in StackBlitz (if reporting incorrect content or code samples)
No response
The text was updated successfully, but these errors were encountered: