Skip to main content

Questions tagged [rxjs]

A JavaScript library that uses observables to work with reactive programming that deals with asynchronous data calls, callbacks and event-based programs.

2 votes
1 answer
17 views

How to use the retry from Rxjs to my await function?

I have to return an await function from my code block, now when the await function is called and failed on the first try, I want to retry it again and if it failed on the second time.. I will show an ...
Daniiiii's user avatar
1 vote
2 answers
23 views

Replacing a nested subscribe when getting multiple details from one initial call for ids

So I'm making a few calls to two back-end services, the first is to get the IDs of "big" items and the rest are separate calls to get the details of each "big" item using its ID. I'...
Scala Enthusiast's user avatar
0 votes
2 answers
49 views

Using async/await with a service call

I'm having trouble understanding how to use async/await in this scenario. I have a function GetAdditionalProducts() that calls a service and returns a result. I call that function elsewhere where I ...
noclist's user avatar
  • 1,761
1 vote
1 answer
29 views

Angular Signals inside effect()

In a component, I am accessing item_id as input parameter. Where can I call toSignal() or .subscribe() to service method, if it is not allowed inside constructor / ngOnInit() effect()? item_id = ...
Nevyan Dimitrov Neykov's user avatar
1 vote
2 answers
28 views

Rxjs concatMap that resolves to switchMap

Could you please clarify what is going on here and whether this is a legitimate approach? I have a method for fetching data. When data is fetched, I want to store it in a BehaviorSubject: test$ = new ...
fuji's user avatar
  • 341
1 vote
1 answer
19 views

Is there an operator to do a "tap only if" in RxJS? A conditional tap action

observable.pipe( tap((booleanValue) => { if (booleanValue) { doSomething(); } }), ) Is there a best practice or a better way to do this? I don't want to filter because the data ...
ymoreau's user avatar
  • 3,686
3 votes
2 answers
122 views

Looping through Observable and mapping result cuncurrently

I have a NgRx selector data$: Observable<Data[]> which contains array of objects. Inside my component I need to go through each data item and make two HTTP calls. One is conditional (based on ...
Marek's user avatar
  • 63
1 vote
3 answers
45 views

Why RXJS filter operator not working here?

I have a switchMap that I need to check for additional condition before I go into subscribe, in this I want to pick out the studyId that matches with the provided studyId I got: this.studyIdObs$....
Thuan Tran's user avatar
1 vote
1 answer
26 views

Angular State of ComponentStore<T>.updater is undefined

I have this ComponentStore @Injectable({ providedIn: 'root', }) export class SceneGraphStore extends ComponentStore<SceneGraphState> { private readonly sceneGraphUtils = new SceneGraphUtils()...
Son Hai Vu's user avatar
1 vote
1 answer
13 views

React.js with rxjs - subscribing inside the store file "fixes" the app

I'm trying out react.js with rxjs. I have build a simple Game Of Life implementation with the option to "bomb" the elements. If I subscribe to my state Observable in the React component, ...
Thom's user avatar
  • 31
0 votes
0 answers
21 views

SuiteCrm 8.6 Angular list rerender based on custom filters button [closed]

I am creating custom filters button and passing payload in suiteCrm 8.6 Angular component to rerender recordn list in accounts and leads, more ..... I have successfully cloned the payload and passed ...
Tirth bhavsar's user avatar
1 vote
2 answers
26 views

Obtain Angular Events Fired During Navigation To A Page

I would like to obtain a list of all Angular router events which were fired during the navigation to a particular view. Yes, I understand in most cases this will be the same. I know how to subscribe ...
Jason's user avatar
  • 4,079
1 vote
1 answer
42 views

How can I increase the variable in the background using Date() in react js?

I have written code that should increment the strong variable every 10 seconds in the background using module Date() import React, { useState, useEffect } from "react"; export default ...
Федя Равчеев's user avatar
0 votes
0 answers
43 views

How to apply declarative RXJS in Angular for route resolvers

I'm interested in adapting the following code for route resolvers. private categorySubject = new Subject<number>(); categorySelectedAction$ = this.categorySubject.asObservable(); ...
IMOsiris's user avatar
  • 141
0 votes
0 answers
16 views

Struggling with mapping a nested Apollo query result to another value

I have a use case in Angular Apollo that looks something like: eval(someId: number): Observable<string | Error> { return this.apollo.query<FirstQuery>({ query: FirstDocument, ...
Scott Deerwester's user avatar

15 30 50 per page
1
2 3 4 5
1402