From the course: Learning RxJS
Unlock the full course today
Join today to access over 24,000 courses taught by industry experts.
Reactive vs. asynchronous programming
From the course: Learning RxJS
Reactive vs. asynchronous programming
- [Instructor] Let's say you had a weather app that displays the current temperature in Seattle at this very moment. Synchronous code wouldn't be able to do this because fetching and displaying the current temperature is a background task. By using asynchronous programming, we can call an API like get current temperature and then display it to the user when it's ready. A few ways we could implement this is on page load and if a user clicked a button, maybe something like Get Seattle Temperature. But what if a user wasn't from the states and used a different temperature system, like Celsius? If we wanted to convert the temperature API response we got from somewhere else, we'd be using a technique called reactive programming. Reactive programming is programming with asynchronous data streams, meaning programming with data that's consistently streamed and needs to be handled. This data is not available all at once and…