Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

214
Views
How to Skip the API call using RxJS skip operator?

I'm trying to skip the very first API call using the skip operator in RxJS . But I am not able to achieve that .

const source = of('a', 'b', 'c', 'd', 'e');

const example = source.pipe(
  tap(() => console.log('Service call triggered')), // I'm using a switchMap here to trigger the API call , tap is just for explaining the issue
  skip(1)
); 

const subscribe = example.subscribe((val) => console.log(val));

In the above example, I'm seeing 5 console.logs . But I want to see only 4 console.logs . Could you help, please?

Stackblitz

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Try below code:

const example = source.pipe(
  skip(1),
  tap(() => console.log('Service call triggered')), 
);

const subscribe = example.subscribe((val) => console.log(val));
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!