"can't access lexical declaration before initialization" with authorization query example : https://redux-toolkit.js.org/rtk-query/usage/customizing-queries#automatic-re-authorization-by-extending-fetchbasequery #4653
Unanswered
jlefebvre1997
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello there,
I'm trying to implement the example fetchBaseQuery wrapper shown in the linked documentation, but unfortunately I have a "can't access lexical declaration before initialization" error, which is caused, I believe, by a circular dependency :
the base query :
The slice in which I declared the action I'm trying to dispatch :
Note that
authApi
uses thebaseQueryWithReAuth
, which might be the cause of a circular dependencyDoes that ring a bell to someone ?
Sorry if this lacks details, I can provide more if needed.
Thanks for your time and help 🙏
Beta Was this translation helpful? Give feedback.
All reactions