Replies: 1 comment 1 reply
-
can you please provide a minimal complete example, e.g. by forking one of the existing examples on stackblitz? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am using Zustand and React context to create a global
api
variable which is needed by/_api
routes.In
/_api
route I use beforeLoad to check if context.api is presentthis part of code works perfectly and correctly check context.api's presence in application but the issue occurs when I try to load
context.api
in my component.I even tried using
Route.useRouterContext().api
but even thereapi
is undefined... But if I try to useuseApiInContext
functionit return the correct api. I followed the same steps as mentioned in Authenticated Routes guide.
What am I doing wrong here?
Beta Was this translation helpful? Give feedback.
All reactions