Read Effects from the DOM with Click Events

André Staltz
InstructorAndré Staltz

Share this video with your friends

Send Tweet

So far we only had effects that write something to the external world, we are not yet reading anything from the external world into our app. This lesson shows how we can change the DOM Driver to return a "DOM Source" representing read effects, such as click events. We will leverage that to create an interactive application.

Brian
Brian
~ 4 years ago

You may be an exceptionally talented developer, but you might be an even more exceptional teacher. I love watching your videos. The way you build abstractions from the ground up is brilliant.

André Staltz
André Staltzinstructor
~ 4 years ago

Many thanks! :)

Xavier
Xavier
~ 4 years ago

FWIW, in this video, Andre uses RxJS v4... this code won't behave properly with RxJS v5. Here's a RxJS v5 snippet that works: http://jsbin.com/voxereq/5/edit?js,console,output

Steve Lee
Steve Lee
~ 4 years ago

Note that fromEvent() is added to JSBin via a <SCRIPT>

fromEvent() and other xstream extras are described in the extras documentation. The source can be found in the same repo.

Laszlo Vass
Laszlo Vass
~ a year ago

Please note, that in order the code to work on Plunker (or in your browser) you must use the legacy (0.21.6) version of SystemJS. For that just modify the script tag in the index.html like below:

<script src="https://unpkg.com/systemjs@0.21.6/dist/system.js">