You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible to subscribe or listen to language change function via react query, and refetch the api (regardig on which page is the user) with selected language
#7864
When user changed language i'm sending selected language in Accept-Language field on header of the request via axios, then i'm fetching data with UseQuery using this axios interceptor, but new data is being fetched only when user makes new request , i want it to be made instantly when language is changed.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
When user changed language i'm sending selected language in Accept-Language field on header of the request via axios, then i'm fetching data with UseQuery using this axios interceptor, but new data is being fetched only when user makes new request , i want it to be made instantly when language is changed.
Beta Was this translation helpful? Give feedback.
All reactions