create_sse_signal seems to work correctly when called during server side rendering and then hydrated on the client, but if it gets called later in the client stage, for example when the client router switches pages and the new page component calls create_sse_signal, then the signal just returns None and forgets that the sse channel is already established and the server already sent a value previously. Any further updates sent from the server do trigger a signal update, but if it's an unchanged value sending an empty patch, then it just changes from None to None. If the server sends a changed value, then applying the patch fails on the client with an error.
create_sse_signal
seems to work correctly when called during server side rendering and then hydrated on the client, but if it gets called later in the client stage, for example when the client router switches pages and the new page component callscreate_sse_signal
, then the signal just returnsNone
and forgets that the sse channel is already established and the server already sent a value previously. Any further updates sent from the server do trigger a signal update, but if it's an unchanged value sending an empty patch, then it just changes fromNone
toNone
. If the server sends a changed value, then applying the patch fails on the client with an error.