leptos_sse icon indicating copy to clipboard operation
leptos_sse copied to clipboard

Using `ServerSentEvents::channel` doesn't work

Open smessmer opened this issue 2 years ago • 1 comments

I just switched from ServerSentEvents::new to ServerSentEvents::channel, but now it panics on the client saying the patch can't be applied. Looking at browser network logs, the very first message sent by the server over the wire is already a patch expecting previous data. And the initial message setting up the data seems to be missing.

smessmer avatar Nov 07 '23 03:11 smessmer

Nvm, my mistake. I built the channel based on some type T while the signal expected Option<T>. That broke it. Wondering if there's any type checking the library could do to detect this and show a better error.

smessmer avatar Nov 07 '23 05:11 smessmer