`useEventSource`: Return `id` besides `event` and `data`
max06 opened this issue · comments
Flo 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
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.