I use Socket IO with RTK Query and Redux-Toolkit, I have a problem when add Socket like a arg to endpoints RTK-QUERY. How can I fix it?
Asked
Active
Viewed 108 times
-1

user19681931
- 19
- 1
1 Answers
0
Query arguments are meant to be really just "data describing the query" - you should usually not pass something like a websocket connection down there. The general recommendation would be to create that outside of a component and just import
it into your query instead of using it as an argument.

phry
- 35,762
- 5
- 67
- 81