Skip to main content

All Questions

0 votes
0 answers
60 views

Reactive programming with NestJs

It is possible to implement Reactive programming in NestJs (Like WebFlux in Java/springboot) !? For example When we run the code : @Controller('/example') export class AccountController { @Get() ...
Lagrida Yassine's user avatar
1 vote
1 answer
54 views

Overlapping Buffer with Closing Selector

I have a stream of mouse events that emit whilst the user drags the mouse cursor on the screen whilst the button is clicked. I want to perform a pairwise operation on these events and can do this ...
James B's user avatar
  • 9,625
1 vote
1 answer
118 views

Conditionally cancel() Flux and preserve value causing cancel

I have following Reactive Flux stream in Java, Flux.just(e1, e2, e3, e4, e5) .flatMapSequentially(/* process elements */) .scan(new Accumulator(null, 0), (element, total) -> new Accumulator(...
manoj's user avatar
  • 1,103
1 vote
3 answers
149 views

Monitoring API Response from angular

I'm trying to monitor an api response to know if the user is currently logged in or not. To do so, I'm sending a get request to /api/status along with the http-only cookie. the endpoint should respond ...
ht990332's user avatar
8 votes
2 answers
12k views

How to compute Angular signal from Observable?

I have started to slowly embrace the new Angular's Signal in my projects. I stumbled upon the following scenario, and while it works, I wonder if this is the "Angular way" of doing it. In my ...
kari's user avatar
  • 222
3 votes
3 answers
384 views

Is this angular component implemented in a reactive way?

I'm starting with reactive programming and I have the following application: The three dotted items is a <ul> tag. Each time a li item is clicked, the app navigates to a route using the ...
Marlonchosky's user avatar
1 vote
2 answers
151 views

RXJS dependent observables

I have 3 observables: query$: Observable<string> = this.q$.pipe(tap(() => this.page$.next(0)); filter$: Observable<number> = this.f$.pipe(tap(() => this.page$.next(0)); page$ = new ...
fuji's user avatar
  • 343
0 votes
1 answer
63 views

How to subscribe while creating an observable?

I have an observable emitting an ID. I want to retrieve an element with that Id and store it into a new observable. However, this observable needs to be subscribed to in order to emit its value. ...
TheBlackBird's user avatar
0 votes
0 answers
26 views

Organising subscriptions of dependent observables

Trying to fully wrap my head around FRP (using rxjs) and struggling a bit with organizing dependent streams and managing their outputs. I have 3 streams: user$, userTeams$ and currentTeam$ and can ...
jsco's user avatar
  • 45
2 votes
0 answers
56k views

RxJS websocket how to resubscribe listening to the events when socket reconnects

I have created an angular service for websocket using RxJS. I have handled the ping/pong and also reconnecting using retry operator my Websocket Service looks like export class SocketService ...
cmgchess's user avatar
  • 10.3k
0 votes
1 answer
134 views

How to subscribe after unsubscribe?

I have an angular service with three attributes and two functions: timerSubscription: Subscription; pollingSubscription: Subscription; incrementTimerSubscription: Subscription; async startTimer(...
Andy88's user avatar
  • 767
0 votes
2 answers
183 views

How can I create a lazy RxJS observable that calculates value only on once, and only when first subscribed?

I have the following class: class BucketManager { private readonly bucketNames$ = new BehaviorSubject<string[] | null>(null) bucketNames = this.bucketNames$.asObservable().pipe(filter(...
Two Horses's user avatar
  • 1,712
0 votes
3 answers
185 views

Initialize a Behavioursubject with a function call

I have an angular service that is supposed to send data to 2 components that display it simultaneously and both can change that data which changes the display of it on both components. I have chosen ...
Evis's user avatar
  • 1
0 votes
1 answer
124 views

SwitchMap from one outer observable to multiple innser observables

I have a method which makes a http request to delete all records and then makes another http request to add a new record, for each record in the records array (I am not expecting the below code to ...
Pablo52's user avatar
  • 111
0 votes
2 answers
192 views

RxJS first operator

I am new to RxJS. I was reading about first operator and understood that it returns the first element from a list/array/sequence or the first element which matches the given predicate. I have written ...
Krishna Chaitanya's user avatar

15 30 50 per page
1
2 3 4 5
55