zeph1665
web socket keeps on disconnecting and connecting
Hi! Its my first time using web sockets. The first code snippet is my socket code. The second code snippet is where I create context to use in the
applyWSSHandler
. My issue is that in my createContext
function. When I try to use the getUser function, the socket keeps on connecting and disconnecting rapidly (like every few milliseconds). But the moment I remove that function, everything works fine. Any idea what could be issue? The create context has no issue without running the socket.
Thank you!
6 replies
Testing with React Testing Library
Hi! I am trying to test my component using react testing library.
My test is simply rendering the component:
But I get this error:
My guess is that I have to somehow wrap the DestinationForm component with some context so that it is aware of the query client but I'm not sure how to.
I'm super new to testing so any help is appreciated(:
Thank you!
2 replies