Cédric Soulas
I make motion graphics with RxJS. I code apps with JavaScript and Elm. I will be available for freelance work from mid-April 2018. Get in touch!

Ep. 1 Ep. 3 Newsletter Watch all Source on Github

Episode 2 - Immutability Monday, 25 Sept.

Last Monday you created a stream of toggle events. When an action was performed on the toggle (on→off or off→on), an event box was emitted.

You can find dozens of properties inside each box. In particular, a box contains a property about the status of the toggle after the action. This is what we are looking for!

Today I’m happy to hand you:

▬ isChecked accepts events from checkable elements (such as checkboxes, radio buttons, options of a menu, toggles, etc). It returns ✔ true if the element is checked, ✘ false otherwise. Here is how it works with ❚ map:

Use a project function on this card, such as ▬ isChecked. Then, this is how ❚ map operates:

A card never modifies the input stream. Instead, it returns a new stream. This principle is called immutability.

Summary

Awesome!

In your collection, you now have:

Next Monday we’ll start building a little machine by assembling several cards together. See you!

Ep. 1 Ep. 3 Newsletter Watch all Source on Github

reactive.how list of animated cards

Learn Reactive Programming

Focus on one new concept – every Monday

Occasional updates, plus:

Cédric Soulas
I make motion graphics with RxJS. I code apps with JavaScript and Elm. I will be available for freelance work from mid-April 2018.