S
SolidJS7mo ago
Silvan

Nested Routing

Hello Friends. i think this isn't something new. and probably asked before. Im coming from stuff like react router or even next/sveltekit. I know theres Outlets. i know i could probably match urls and return the right component. But i dont see a recommended way of doing this. can someone lead me to a way of doing this?
No description
6 Replies
Silvan
Silvan7mo ago
so dashboard renders a screen with navigation. and the right part should be defined by dashboard/:whatever
thetarnav
thetarnav7mo ago
GitHub
GitHub - solidjs/solid-router: A universal router for Solid inspire...
A universal router for Solid inspired by Ember and React Router - GitHub - solidjs/solid-router: A universal router for Solid inspired by Ember and React Router
Silvan
Silvan7mo ago
yep and im having a hard time understanding it. first up theres examples with <Routes and a path prop which it dosent have? is it fine to use multiple <Routes components? like i cant form a pattern in my head yet its not entirely like a <slot /> as in astro or svelte either
Calhistorian
Calhistorian7mo ago
@Silvan I have this precise setup using solid-router Here are the routes
<Route path="/settings" component={Settings}>
<Route path="/" component={ProfileSettings} />
<Route path="/accounts" component={AccountSettings} />
<Route path="/appearance" component={AppearanceSettings} />
<Route path="/keyboard" component={KeyboardSettings} />
<Route path="/search" component={SearchSettings} />
<Route path="/security" component={SecuritySettings} />
<Route path="/sandbox" component={SandboxSettings} />
<Route path="/about" component={About} />
<Route path="/**" component={Error} />
</Route>
<Route path="/settings" component={Settings}>
<Route path="/" component={ProfileSettings} />
<Route path="/accounts" component={AccountSettings} />
<Route path="/appearance" component={AppearanceSettings} />
<Route path="/keyboard" component={KeyboardSettings} />
<Route path="/search" component={SearchSettings} />
<Route path="/security" component={SecuritySettings} />
<Route path="/sandbox" component={SandboxSettings} />
<Route path="/about" component={About} />
<Route path="/**" component={Error} />
</Route>
Silvan
Silvan7mo ago
i actually got it working,. thanks!
Calhistorian
Calhistorian7mo ago
Well the rest of my message is not necessary - great
Want results from more Discord servers?
Add your server
More Posts
stack overflow internal to solidjs?``` Exception has occurred: RangeError: Maximum call stack size exceeded at runUpdates (file:/c:/typconfused on rendering issue```tsx const [selectedFile, setSelectedFile] = createSignal<File | null>(null) return ( <No known conditions for "./browser" specifier in "msw" packageI'm trying to setup msw with my test environment in vitest and solid. Any idea why is this caused? Checking if children exists breaks refsThis has been driving me insane, but I just figured out that if you do something like this : https:/Confusion with signal not updating the domI am not sure what to make of this other than the fact that I am confused, but the filename() signalThis expression is not callable. Type 'Number' has no call signatures.Hey! I added typescript to my project and now one of my `createSignal` isn't working properly and I SyntaxError: The requested module 'solid-js/web' does not provide an export named 'classList'I am getting this error when using the solid-slider library in my code during SSR. I am using Solid Unrecoverable Hydration Mismatch error when trying to implement pagination on a custom tableI am relatively new to Solid, and I am running into an error that I don't quite understand.. I am iHow to set a store back to a default state at the top level (or clear it)?Hi, I'm trying to use a store to represent the state of a dynamic number of inputs, where the inputsHow to fetch chunks of data with createResouce?How can I use `createResource` to fetch chunks of data from a paginated API endpoint? I need to fetc