Skip to content

SvelteKit SSE example #3

@karimfromjordan

Description

@karimfromjordan

I'm not sure how complex an SSE (Server Sent Events) example should be. But since the actual SSE part on the backend is super simple we could combine it with a toast component to make it more "real world". SSE and websockets are also great to demonstrate custom stores.

  • use a +server.js route to return a ReadableStream response for the SSE connection
  • use a custom store to listen for any incoming messages/events
  • include a minimal but complete toast component to display the messages

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions