S
SolidJS5mo 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 Skyum5mo ago
what version of the solid router is this?
dafuq
dafuq5mo ago
"@solidjs/router": "^0.10.10" Is there some sort of breaking change? I know there's no <Routes /> in this.
Brendonovich
Brendonovich5mo 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
dafuq5mo ago
That was it, thanks @Brendonovich ❤️
Want results from more Discord servers?
Add your server
More Posts
Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted...We are facing this rather flakey error when upgrading to the new Solid Start Beta 0.4. Failed to exDownload file from public/documentsHi, I want to have an A-Element, that starts a download for a .pdf-file I placed in public/documentHaving trouble implementing a stack of views because of the lifecycle of <Dynamic>For my site, I have implemented a stack of views, sort of like on iOS where you can push and pop vieUse solid as middlewareGoal: parse existing html from third party server, read all data-component attributes from HTML, loaHow to trigger createEffect when navigating to the same URL ?Hi, is it possible to trigger a createEffect that listens to location.search from the solid router'sGetting ReferenceError: React is not defined with Vitest + Solid Testing LibraryI honestly have no idea how I am receiving this error but I am despite testing using `@solidjs/testibackend solidstart or another backend.Does solidstart make sense if a third-party backend (fastapi) is used? I don't want to write backendUnderstanding the deployment of a SolidJS app (with a separate backend)I hope this doesn’t go too off topic because this is more of a general question but I am trying to uCreating custom SolidJS hook that can be used in a global scopeNeed some help understanding how to build a custom SolidJS hook that can be used both locally insideHow to set a cookie that is returned from api call?I'm using createAsync for a server api call. The api returns data with cookie that I need later. ```