Skip to Main Content

ProjectsuseEventSource

Project Screenshot for My useEventSource Project
  • TypeScript
  • Vue
  • Nuxt
  • NPM

What is useEventSource?

useEventSource is a Vue composable for simplifying Server-Sent Events (SSE).

It is based on the standard EventSource interface, and makes working with SSEs simpler in Vue & Nuxt applications.

npm i @minch/use-event-source

Why Did You Build It?

When working on apps which involve streaming data from the server to a client, the EventSource API is an important part of that workflow in the client. I was working on a Gen AI app which needed to handle responses streamed to the browser. I implemented the functionality inside my Vue components which I eventually extracted into a composable and published as an NPM package.

What Tools Did You Use?

  • Language: TypeScript, Vue, Nuxt