You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On the backend I return a websocket stream which reads from Kafka like 10 messages which is seen in the net inspector:
A few questions
When I print newMessage it only shows the last message, while all messages seem to come from the backend
What's best way to build up an array which gets updated every time there is a newMessage? I've seen examples of useEffect, but I don't know if that's the best way to do it with all the Proxy stuff and create heavy re-renders
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi !
Thanks for this amazing project.
I'm using the subscription react part like this:
On the backend I return a websocket stream which reads from Kafka like 10 messages which is seen in the net inspector:
A few questions
newMessage
it only shows the last message, while all messages seem to come from the backenduseEffect
, but I don't know if that's the best way to do it with all the Proxy stuff and create heavy re-rendersThings I've done which did not help:
id
field in theBusMessage
typenormalization
tofalse
Beta Was this translation helpful? Give feedback.
All reactions