S
SolidJS11mo ago
dafuq

Make sure your app is wrapped in a <Router />

Hey folks, probably something silly but why can't I access useNavigator in my RouteGuard? Attaching my RouteGuard and App.tsx 🙏
No description
No description
4 Replies
Birk Skyum
Birk Skyum11mo ago
what version of the solid router is this?
dafuq
dafuqOP11mo ago
"@solidjs/router": "^0.10.10" Is there some sort of breaking change? I know there's no <Routes /> in this.
Brendonovich
Brendonovich11mo ago
@Benny Routers should only have <Route/> elements as their children. To make guard routes you’ll need to add a path-less route containing the layout component
dafuq
dafuqOP11mo ago
That was it, thanks @Brendonovich ❤️
Want results from more Discord servers?
Add your server