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
5 Replies
I am thinking that AuthCheck would need to be imported into a function that's wrapped in <Router> or needs to be a Route
AuthCheck will be imported by LoginForm.tsx which will be imported by Login.tsx which is within a <Route> in index.tsx
Any other ideas?
I have none sorry 😦
other than to make sure it isn't imported into another component that's not wrapped in router....
not sure if you already found the solution to this but I just found out that I get this error whenever I use
useLocation()