Skip to content
Discussion options

You must be logged in to vote

Not sure I fully follow the use-case. If something is only available as a hook, like useAuth, and you want to access that in a react-router loader - you have to pass it in there. Though I am questioning the need of having a token refresh logic live inside react. As you said, you mostly need this outside of react (in the queryFn). Usually, the best place to do these kind of things is in your "network layer", like the fetch wrapper you're likely to have. There, you also don't have or need react.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@debater-coder
Comment options

Answer selected by debater-coder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants