Handle logout and user-dependent queries #7839
-
Heyo all 👋 We are currently developing a React Native app that uses TanStack Query. This app is available in multiple countries, and users can have accounts in different countries. Additionally, users can use the app without being logged in. We have several queries in the app that depend on the connected user. But we are not directly sending the user ID in the query parameters: the backend identifies the user based on cookies. I need your recommendations on how we should handle query keys and user login / logout / change country etc. We have a few potential solutions: What do you think would be the best practice for our case? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
1 and 3 together sounds good |
Beta Was this translation helpful? Give feedback.
1 and 3 together sounds good