S
SolidJS•11mo ago
tapsy0

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

Hi guys, new to frontend dev and started with solidjs. Now I'm stuck at trying to use useNavigate and don't know what I'm doing wrong. Error message: Make sure your app is wrapped in a <Router /> solidjs/router version: 0.11.2 solidjs version: 1.8.11
No description
No description
5 Replies
Grahf
Grahf•11mo ago
I am thinking that AuthCheck would need to be imported into a function that's wrapped in <Router> or needs to be a Route
tapsy0
tapsy0OP•11mo ago
AuthCheck will be imported by LoginForm.tsx which will be imported by Login.tsx which is within a <Route> in index.tsx
No description
tapsy0
tapsy0OP•11mo ago
Any other ideas?
Grahf
Grahf•11mo ago
I have none sorry 😦 other than to make sure it isn't imported into another component that's not wrapped in router....
daan banaan
daan banaan•11mo ago
not sure if you already found the solution to this but I just found out that I get this error whenever I use useLocation()
Want results from more Discord servers?
Add your server