Asynchronous and reactive programming (Promises, RxJS) - flowup/knowledge GitHub Wiki
Client-side programming is asynchronous by nature, as changes to UI state are prompted by user events, network responses, etc. The most common ways of handling events are:
- callback functions (used to be the only way, e.g. via
addEventListener
), - Promises (now built into ECMAScript, including
async
/await
syntax), - Observable pattern (more expressive, currently reliant on 3rd party implementations, e.g. RxJS).
Promises
π Documentation
- constructing new Promises
- handling Promises:
- Promise synchronization
RxJS
π Documentation
π₯ Courses
- Reactive JS: Are you ready for the next big paradigm shift? - Udemy course (ask for credentials)
π¬ Talks
- You don't need RxJS ... but it f**king helps by Pavel TobiΓ‘Ε‘ (PDF slides, source code)
π¨ Workshops
- RxJS operators and observable chain by Jan Strapek (Google slides, PDF)