Closed ryanzec closed 8 months ago
Yeah this might be a little awkward but the only thing that can be inside <Router>
now is a list of <Route>
(or something that provides the array of route configuration).
Any other components that you used to have inside <Router>
(wrapping the routes) need to move inside the Router's root
property.
See https://github.com/solidjs/solid-router#configure-your-routes
Yeah.. The <Router>
is like the old <Routes>
component is the best way I can describe it. The reason is so that we can control what gets rendered completely (on the server). This will enable things like Server Components and single flight mutations.
This is an API change that might not be as nice ergonomically but it is important.
Yea, I guess I missed the link in the migration notes that references that part of the documentation, sorry about that.
The only other things I got tripped up on was the fact that the component used as root
for the <Router />
seems to not support having any custom properties but that was easy enough to refactor.
Thanks for the help.
Describe the bug
Maybe I am doing something wrong but it seems like solidjs router is bugged when I upgrade to
0.10.x
. I looked at the migration notes here : https://github.com/solidjs/solid-router#migrations-from-09x : and I removed the use of<Routes />
but it just complete breaks (nothing loads).The error I get is:
Which references this line: https://github.com/ryanzec/train-ui/blob/419da7730acd83cd2dafdfdca53c256282293502/applications/sandbox/packages/components/application-frame/application-frame-navigation-item.tsx#L14
But it is in a
<Router />
so I am just not sure if there is some other thing I need to do in this migration.Your Example Website or App
https://github.com/ryanzec/train-ui/pull/1
Steps to Reproduce the Bug or Issue
solid-router-bug-maybe
npm install
npm run sandbox:dev
http://localhost:6006
(see error in console at this point)Expected behavior
The application to load
Platform
Additional context
No response