The current implementation of the events logic in our platform uses ReplaySubject in some areas. However, this approach has an issue as it emits all previous values to its subscribers. To address this issue, we propose replacing ReplaySubject with BehaviorSubject, providing the last value to subscribers.
Expected Behavior
By replacing ReplaySubject with BehaviorSubject, the events logic in our platform will behave as follows:
Subscribers will receive only the latest value emitted by the event, rather than the entire event history.
In the absence of any emitted values, subscribers will receive an initial default value, if provided.
Additional Context (Optional)
The BehaviorSubject class in RxJS provides an initial value and emits the most recent value to new subscribers.
This feature request aligns with best practices in event handling and data transmission, ensuring improved performance and a better user experience.
Description
The current implementation of the events logic in our platform uses ReplaySubject in some areas. However, this approach has an issue as it emits all previous values to its subscribers. To address this issue, we propose replacing ReplaySubject with BehaviorSubject, providing the last value to subscribers.
Expected Behavior
Additional Context (Optional)