I switched a map, and you’ll never guess what happened next…
summary
A concrete demo builds an autocomplete component from an observable stream of tweets and agencies, showing code that maps each tweet to an agency then to an observable of recruits, subscribes, and flattens. The talk shows real RxJS code replacing nested subscribes with switchMap, explains that it unsubscribes from the previous recruits observable before subscribing to the new one, and runs the app so the switch behavior and bug fix are visible and working.
AI-written summary · about
chapters (11)
- 0:00Introduction
- 1:51Kevin and framework obsession
- 5:27SwitchMap with CEO analogy
- 7:39Tweets to recruits with observables
- 10:50Nested observables and flattening
- 13:29Need for flattening strategy
- 14:34Implementing switch strategy
- 16:44Introducing switchMap
- 18:10How switchMap works
- 19:23Conclusion
- 20:27Final remarks
related talks
54mReactive Angular 2
37mReactive Programming with RxJS
01h 45mRxJs from Scratch
51mReactive programming in Angular
36mRxJS Recipes
23mHow we’re embracing functional programming to build a large SPA
32mMastering Reactive Programming with RxJS
34mCollect, Combine and Cache RxJS Streams for User-Friendly Results
