Skip to main content
Code Review

Questions tagged [rxjs]

The Reactive Extensions for JavaScript (RxJS) is a set of libraries for composing asynchronous and event-based programs.

Filter by
Sorted by
Tagged with
0 votes
0 answers
31 views

Real-time data functionality using SubjectBehaviour in Angular v18

I'm building a personal finance app in angular v18 https://github.com/sumaya-aj/personal-finance-app I started with "Pots" section. The code I shared has two components and a service. The ...
Sumaya A.'s user avatar
2 votes
1 answer
278 views

Efficient browser `StorageEvent` handling

I have this class EfficientStorageEventProvider, which is responsible for efficient handling of StorageEvent ...
1 vote
1 answer
147 views

Convert from get response to array of type

I would like to know if this is the best/most efficient/industry standard way of converting from the http response to an array of typed values: Type class: ...
-1 votes
1 answer
1k views

If condition in combineLatest observables [closed]

I have many observables so I use combineLatest in RxJS. After get all results I need to check one of value by using if condition. If the condition meets then call ...
Love's user avatar
  • 369
1 vote
1 answer
86 views

Typescript error handler

I wrote a function in Typescript which takes required parameters, optional parameters and parameters with default value. I want to use this function for error handling of http requests. I am not sure, ...
6 votes
1 answer
3k views

Custom RxJS operator to prevent duplicate API calls in Angular

I have a usecase where I want to prevent unexpected duplicate Http calls. I'm wondering if I can have a custom operator which can be used in pipe for any API as shown in below ...
1 vote
2 answers
148 views

how to avoid nested asynchronous subscriptions in RxJS?

I got this two subjects that both have a delay and I need the second one to be subscribed when the first one is completed, asynchronously. Both subjects only emit once (http requests) and I'm trying ...
azerafati's user avatar
  • 131
2 votes
1 answer
200 views

Rxjs search in Angular

I created an rxjs search for a hiring company, but I got rejected for the following reason: -performance issue on a bigger data set. -bugs My question is how can I make this code better for the next ...
0 votes
1 answer
326 views

RxJs - Flat nested swithMaps and pass variables on Http interceptor

How can the following method be flattened? I tried to pipe all the operators to the first pipe (from(this.fireAuth.currentUser)) but I lost access to the previous ...
0 votes
1 answer
1k views

Handling a spinner for multiple REST calls

Context In an Angular application, I have three <select> boxes that are fed from the database with a relatively small data set. These boxes are part of a ...
4 votes
2 answers
3k views

Angular10 RxJS - Interceptor to add/refresh JWT Token

I have a project, for which I use Tokenauthentication with JWT Tokens. I am relatively new to Angular Development and rxjs in particular, so there are a lot of concepts I am likely not yet familiar ...
2 votes
1 answer
2k views
0 votes
1 answer
852 views

Refactor multiple if condition in JavaScript/TypeScript

I want to refactor this code but am wondering how I should start it. I'm not sure this code is totally against clean code or not. I'm thinking to use RxJS or a JavaScript builtin method. I'd like to ...
1 vote
1 answer
5k views

Merge the multiple observables responses into a single array

Here's what I trying to do: Given a paginated API, get all the resources using parallel requests. The API returns a limited number of resources per call. So, you need to use an offset parameter to get ...
Adrian's user avatar
  • 111

15 30 50 per page
1
2 3 4

AltStyle によって変換されたページ (->オリジナル) /