Question from the Introduction to RxJS test

Why use the Share operator in RxJS?

Hard

Here is an example known from Sphere RxJS, why use the Share operator?

 const example$ = timer(1000).pipe(
tap(() => console.log("side effect is called")),
map(() => "Result is mapped"),
share());

const firstSub = this.example$.subscribe();
const secondSub = this.example$.subscribe();
Author: Amine BouchamStatus: PublishedQuestion passed 87 times
Edit
0
Community EvaluationsNo one has reviewed this question yet, be the first!