Replies: 2 comments 1 reply
-
Hello @jotaachm, any updates on this? Have you figured it out? |
Beta Was this translation helpful? Give feedback.
1 reply
-
I have the same problem. It would be nice to avoid the duplication of code and redundant fetching without using tanstack query, but it may be unavoidable. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi!
I read some other discussions and understood that you need to check auth-status at every loader and that you should read from the source of truth directly. However, for example, in my app, there are some routes that only managers should have access to so I need to check not only if the user is logged in but also if this user is a manager which is stored in their user object. In my context, I have a getUser function that gives me the information I need about the user by fetching from the relevant endpoint in my API. Since I can't access this context in my loaders, does this mean the only other option is to call that endpoint in every loader? This doesn't feel very efficient so I was wondering if anyone had any other solutions.
On a separate note, I'd love some clarification on which loaders run in parallel and why you need to check auth at every loader.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions