noxy
navigate - Wait for navigation to finish
Hello, I'm reevaluating SolidJS and somehow it started really click in my head. There's one thing that I'm trying to do right now, basically I'm wrapping my whole app with UserProvider and and to expose two 'hooks'
useUser
and useMaybeUser
with the only difference between them being that useUser
would enforce that user is present or navigate you to login page.
Here's what I came up with for now.
This code seems to be triggering 'unreachable' error. I'm wondering what would be the best way to wait for navigation to finish so 'unreachable' error is actually never reached?4 replies