S
SolidJS11mo ago
bic mem

noob question regarding solid-router

Hey guys, I'm running through this tutorial on Solid-JS as I am new to web dev, I got to the video on the solid-router and noted it broke so I ran through the documentation and saw there were changes made recently. I tried figuring it out myself but my page still doesn't render the Home component.
No description
No description
No description
8 Replies
Brendonovich
Brendonovich11mo ago
I'm not sure if it'll fix your problem, but all the stuff outside of the Router should be put in a separate component and provided via the router's root prop
bic mem
bic memOP11mo ago
No description
Brendonovich
Brendonovich11mo ago
And make sure App is rendering props.children
bic mem
bic memOP11mo ago
No description
bic mem
bic memOP11mo ago
ahhh
bic mem
bic memOP11mo ago
do i necessarily need to pass props to render something ? here's the top of App.jsx
No description
Brendonovich
Brendonovich11mo ago
Yeah the root component must receive props and render children - see the router docs https://github.com/solidjs/solid-router?tab=readme-ov-file#configure-your-routes
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
bic mem
bic memOP11mo ago
thank you bro, my website has been fixed 🙏 , for some reason it didn't click despite reading it multiple times
Want results from more Discord servers?
Add your server