Feature request: add an event handler on event source received

Open
#330 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
typescript
Domain
api

Research direction

Start by locating the SDK entry points that process the eventSourceUrl and realtime initialization parameters, then compare that flow with the existing onChange handling. Confirm how manually configured event sources deliver events. Done means exposing an onEventSourceReceived handler that runs for each received event independently of onChange, with coverage for the new behavior.

Written by the indexing model from the issue text.

Description

Problem

At the moment the SDK provides realtime capabilities through eventSourceUrl and realtime init parameters but it doesn't expose a specific handler when a new event is received.
To add custom logic, it requires to setup the event-source manually

Solution

A solution could be to add a new handler onEventSourceReceived that would be triggered when a new event is received to allow for additional logic independently from onChange

Dominant language
TypeScript
Stars
67
Forks
47
Avg merge
1d 5h
Merged PRs (30d)
4

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Flagsmith/flagsmith-js-client

All issues in Flagsmith/flagsmith-js-client

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.