Send new requests from refresh clicks in RxJS
lessonDuration 5m 7s
In this lesson we learn how to fetch new data whenever the refresh button is clicked. This lessons starts to give us a feeling of how is it to develop reactive applications in RxJS.
Browse
Find courses, lessons, articles, talks, and podcasts.
158 results for "rxjs"
Showing 49–72 · Page 3 of 7
lessonDuration 5m 7s
In this lesson we learn how to fetch new data whenever the refresh button is clicked. This lessons starts to give us a feeling of how is it to develop reactive applications in RxJS.
lessonDuration 5m 22s
Learn how to take data from a network response and display it on the DOM using RxJS reactive event streams.
lessonDuration 7m 14s
In this lesson we start building a small UI widget: suggestions box displaying users to follow in Github. We will learn how to perform network requests to a backend using RxJS Observables.
lessonDuration 4m 36s
See a practical example of reactive programming in JavaScript and the DOM. Learn how to detect double clicks with a few operators in RxJS. We will use `.bufferWhen` to accumulate events into an array to determine if a double click occurred.
lessonDuration 4m 31s
This lesson introduces Reactive Programming using RxJS in simple terms, with a concrete example and no scary terminology.
lessonDuration 3m 39s
In this lesson we look at the common strategies for creating and flattening higher order observables in RxJS. In particular, we give switchMap a careful review. It is an operator that works as an "asyncMap" and is capable of solving many of our asynchronous problems in JavaScript.
lessonDuration 5m 21s
This lesson will show when to apply groupBy in the real world. This RxJS operator is best suited when a source observable represents many data sources, e.g. an observable for multitouch events.
lessonDuration 4m 2s
groupBy() is another RxJS operator to create higher order observables. In this lesson we will learn how groupBy works for routing source values into different groups according to a calculated key.
lessonDuration 4m 32s
There are variants of the window operator that allow you to split RxJS observables in different ways. In this lesson we will explore the windowToggle variant and see one of its use cases in user interfaces.
lessonDuration 6m 58s
Mapping the values of an observable to many inner observables is not the only way to create a higher order observable. RxJS also has operators that take a first order observable and return a higher order Observable. In this lesson we will learn about window, an operator to split an observable.
lessonDuration 5m 39s
RxJS operators mergeMap and switchMap are useful for handling asynchronous responses from the server, but they can do much more. In this lesson, we will see how to use mergeMap to achieve the same functionality as map() or filter() or other custom behaviors.
lessonDuration 2m 11s
Like switchMap and mergeMap, concatMap is a shortcut for map() followed by a concatAll(). In this lesson we will explore this RxJS operator and its properties.
lessonDuration 4m
Like RxJS switchMap() is a shortcut for map() and switch(), we will see in this lesson how mergeMap() is a shortcut for map() and mergeAll(), and learn its arguments for customised behavior.
lessonDuration 6m 4s
In this lesson, we will learn about switchMap, a shortcut for mapping to a higher order RxJS Observable, then flattening with switch. We will also see a practical example with network requests that would be used in the real world.
lessonDuration 3m 22s
Besides switch and mergeAll, RxJS also provides concatAll as a flattening operator. In this lesson we will see how concatAll handles concurrent inner Observables and how it is just mergeAll(1).
lessonDuration 3m 19s
Among RxJS flattening operators, switch is the most commonly used operator. However, it is important to get acquainted with mergeAll, another flattening operator which allows multiple concurrent inner observables. In this lesson we will explore mergeAll in detail.
lessonDuration 4m 52s
To consume the higher order RxJS Observable, we had to do a subscribe inside a subscribe. In this lesson, we will learn a better approach using flattening operators, of which switch() is a common and simple one.
lessonDuration 4m 35s
An Observable may emit values of any JavaScript type: numbers, strings, booleans, objects, etc. This means an RxJS Observable may also happen to emit values which are themselves observables too. In this lesson we will learn more about this use case and begin learning about the so-called "higher order observables".
lessonDuration 5m 35sFree
Fetching data over the network can be costly which is why you might want to introduce caching to prevent unnecessary network calls from happening. In this lesson you will learn how to implement a simple caching strategy combining Angular's `HttpClient` and RxJS operators. _(Note, this video lesson is highly inspired by Thoughtram's article on [Advanced caching with RxJS](https://blog.thoughtram.io/angular/2018/03/05/advanced-caching-with-rxjs.html))_
lessonDuration 5m 15sFree
Subscribing to RxJS Observables is a common operation in Angular components. However, we need to pay attention at also cleaning up our subscriptions when our component gets destroyed. This especially holds for those type of Observables that do not immediately complete (like the ones returned from Angular's HttpClient). In this lesson we're going to take a look at different approaches for unsubscribing and how the `async` pipe can take away a lot of this burden. Also make sure to check out [this article on "RxJS: Avoid takeUntil leaks"](https://blog.angularindepth.com/rxjs-avoiding-takeuntil-leaks-fb5182d047ef)
lessonDuration 3m 5s
While it's great to use the RxJS built-in operators, it's also important to realize you now have the knowledge to write them by yourself if needed. The `map` operator turns out to be a simple `MapSubscriber` which takes a function and applies it to the value passed to `next`.
lessonDuration 58s
The most common scenario for creating custom operators is to reuse the built-in operators shipped with RxJS. You'll find yourself re-using `map`, `filter`, and others will solve most of the problems you come across.
lessonDuration 2m 5s
With knowledge of extending `Subscriber` and using `source.lift` to connect a `source` to a `subscriber`, you can now create your own operators by writing functions that return a `source.lift` call. This lesson creates a simple "multiply" operator in RxJS.
lessonDuration 1m 36s
The `lift` method on each source hides away the internals of RxJS so you can simply connect a `source` to the `subscriber` you're working with. The `lift` method take an object with a `call` function with `subscriber` and `source` arguments, then it's up to you how you want to connect them together.