Replies: 1 comment 2 replies
-
can you elaborate a bit what websockets have to do with the onlinemanager? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello!
I recently started working with WebSockets and I wanted to hook up the connect/disconnect/reconnect events with
TanStack Query
. But it seems like that isn't possible at the moment, since I can set up only oneonlineManager
.The solution I had in mind for this is to have a dedicated
onlineManager
as an option for each query and/or mutation. That way I could hook up thatonlineManager
to my WebSocket events. And, since I am working in React Native, create a dedicated hook (useWebSocketQuery
), which will just overwrite the existingonlineManager
. Something like:What do you think about this? Is there any other solution, which I am not aware of?
If this is feasible and you give the green light for it, I can work on it and create a PR if necessary. I've already looked up the source code and I have already some ideas on how to approach it. However, I would probably need some minor guidance.
Btw, this has been briefly mentioned in this discussion.
Thank you 😄
Beta Was this translation helpful? Give feedback.
All reactions