messense/leptos_sse

Using `ServerSentEvents::channel` doesn't work

smessmer opened this issue · 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.

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.