We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 716cba2 commit a902c8dCopy full SHA for a902c8d
content/rxjs/avoid-nested-subscriptions.md
@@ -24,7 +24,12 @@ fetchProduct(1).subscribe(product => {
24
25
We first fetch the product and once the request is resolved we fetch similar products inside the subscribe block of the first, most outer observable.
26
27
-This is considered to be an anti-pattern or code smell.
+This is considered to be an anti-pattern or code smell for the following reasons:
28
+- 👹 it brings us back to callback hell,
29
+- 💔 it breaks Reactive Programming,
30
+- 🐢 it breaks observables laziness,
31
+- 💥 it doesn’t help with subscription management,
32
+- 🤢 it's ugly anyway.
33
34
Instead we can use one of the flattening operators to get rid of this code smell and solve it more elegantly:
35
0 commit comments