Comment

Comment by capn_duck

The JS examples don't seem too demonstrative to me. Especially for someone not very familiar with RxJS. Any time you're wrapping something with `from` or `of`, I raise an eyebrow

  export function pipeline(in$: Observable<Product>): 
  Observable<string> {
      return in$.pipe(
          mergeMap(product => from(product.Images)),
      );
  }
Why use mergeMap at all here? Why not not just

  return in$.pipe(
    map(product => product.Images),
  );
I get that this is a toy example, not trying to be pedantic.
parent capn_duck 2 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton