RxJS is really good at certain problems involving asynchony, especially when multiple 'events' are being called and reference. The consitent tool kit that you have at your disposal makes it easy to read and extensible - harder to mess up.
RxJS needs upfront thought on the design of the code to make it become as extensible and beautiful as possible. In this live stream, Rares' broke a requirement from a pretend manager down into digestible problems that could be solved immediately.
A key aspect of this problem solving style is identifying the unkowns upfront so you know how to design your solution in a self-contained, isolated fashion. In this case, separating how the UI is represented as well as how background tasks start/end. He assumes that there will be tasks coming in and ending themselves somehow.
Once the problems are broken down into digestible chunks, Rares builds chains of RxJS streams that will end up reading much like the plain english requirements they were broken down into.
The notes in this repository are broken down into 3 sections:
Some question(s) are outlined in the essential questions section of the README for you to think about as you learn this content. There is no 'definitive' answer to these questions but as you learn, you'll develop a more contextualized answer.
Right below is the intended outcomes of the material, these are the skills and knowledge you will learn that you can take to any application to use.
What problems are best solved reactively?
How can I best extract this problem into a reactive solution?
How can I connect imperative code with the streams I’m building?
How should abstractions be named?
- Identify a problem
- See why rxjs would be a good solution
- Think about how to solve with RxJS
- Neatly wrap our code so it can be used anywhere
- Learn some operators along the way.
- combineLatest, timer, delay, scan, takeUntil, skipWhile, distinctUntilChanged, shareReplay, etc.
During Rares’ live stream about thinking reactively, some members of the chat shared some resources for learning RxJS:
These are community notes that I hope everyone who studies benefits from. If you notice areas that could be improved please feel free to open a PR!