Hello, what's a good way to way to implement realt...
# javascript
m
Hello, what's a good way to way to implement realtime subscriber with React ? I'm using on the useEffect with cleanup once the component is removed from the dom, sometimes it works sometimes it fails to change the state. Any docs & tips ? I can see the payload coming in on the websocket from the [network] tab, but the code isn't updating nor do something..
Is there a socket cold start? before it starts to work?
Since I get this bug only at the first time when I login after session ends
g
Is it possible your useEffect is running before your finished signing in? You can get errors by doing .subscribe((status,e)=>{console.log(status,e)})