vueuse / vueuse

Collection of essential Vue Composition Utilities for Vue 2 and 3

Home Page:https://vueuse.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`useEventSource`: Return `id` besides `event` and `data`

max06 opened this issue · comments

commented

Clear and concise description of the problem

With the current implementation, it's not possible to react to repeating events/data more than once, for example to ping-events without data. Following the docs, the id is part of the event, and would allow reacting to all messages.

Suggested solution

Add id besides the existing event and data-export.

Alternative

No response

Additional context

More a question... since watch requires ticks between changes to not miss-out on updates, does useEventSource make sure to pass all messages along? Is there any chance we could miss messages if, let's say our source burst sends 100 updates at once?

Validations