pekim
Reactivity resulting from updates in a websocket event listener
I am struggling to understand why setting a signal in an event listener is not driving re-rendering for the signal. In the code below I observe reactivity for
count2
(that is set in the setInterval callback), but not for count
(that is set when a message is received on the websocket).
I can see from the console.log
in the message event handler that the values passed to setCount
are changing. So my expectation is that the rendered value should change.
I don't doubt that the reason for this is covered somewhere in the docs. I suspect that I'm simply misreading or misunderstanding something.
3 replies