Replies: 1 comment 1 reply
|
can you please provide a minimal complete example, e.g. by forking one of the existing examples on stackblitz? |
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
apivariable which is needed by/_apiroutes.In
/_apiroute 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.apiin my component.I even tried using
Route.useRouterContext().apibut even thereapiis undefined... But if I try to useuseApiInContextfunctionit return the correct api. I followed the same steps as mentioned in Authenticated Routes guide.
What am I doing wrong here?
All reactions