S
SolidJSā€¢2w ago
Root:3000

How to route `products/[id]/settings` in Solidstart?

trying to achieve example.com/products/1/settings
|--routes/ // example.com
|--products/
|--[id].tsx // example.com/products/1
|--[id]/
|--settings.tsx // example.com/products/1/settings
|--routes/ // example.com
|--products/
|--[id].tsx // example.com/products/1
|--[id]/
|--settings.tsx // example.com/products/1/settings
9 Replies
Brendonovich
Brendonovichā€¢2w ago
is settings supposed to be inside [id]/?
Root:3000
Root:3000ā€¢2w ago
yes
Brendonovich
Brendonovichā€¢2w ago
that should work, try removing node_modules/.vinxi and restarting the dev server
Root:3000
Root:3000ā€¢2w ago
let me try
peerreynders
peerreyndersā€¢2w ago
|-- routes/ // example.com
|-- products/
|--[id]/
|--index.tsx // example.com/products/1
|--settings.tsx // example.com/products/1/settings
|-- routes/ // example.com
|-- products/
|--[id]/
|--index.tsx // example.com/products/1
|--settings.tsx // example.com/products/1/settings
Root:3000
Root:3000ā€¢2w ago
let me try šŸ‘
Brendonovich
Brendonovichā€¢2w ago
ah i was just looking at the settings part
Root:3000
Root:3000ā€¢2w ago
Thank you so much for your time. Btw vinxi has some major hydration related bugs related auto refreshing the route logic after things change
peerreynders
peerreyndersā€¢2w ago
https://github.com/solidjs/solid-start/issues/1473 How I remember how FS routing works:
<Router root='src/routes/index.tsx'>
<Route path="/product/:id" component='src/routes/product/[id].tsx'>
<Router path="/" component='src/routes/product/[id]/index.tsx' />
<Router path="/settings" component='src/routes/product/[id]/settings.tsx'/>
</Route>
</Router>
<Router root='src/routes/index.tsx'>
<Route path="/product/:id" component='src/routes/product/[id].tsx'>
<Router path="/" component='src/routes/product/[id]/index.tsx' />
<Router path="/settings" component='src/routes/product/[id]/settings.tsx'/>
</Route>
</Router>
ā€¦ it explains why a layout appears at the level above the nested routes.
GitHub
[Bug?]:Error: Hydration Mismatch. Unable to find DOM nodes for hydr...
Duplicates I have searched the existing issues Latest version I have tested the latest version Current behavior šŸ˜Æ Whenever i create a route with folders like routes/admin/dash.tsx this error happen...
Want results from more Discord servers?
Add your server
More Posts