Skip to content

Latest commit

 

History

History
23 lines (17 loc) · 894 Bytes

map.md

File metadata and controls

23 lines (17 loc) · 894 Bytes
id compareWith video compare lesson title layout class preview_image preview_image_alt
map
filter
238067754
map
2
Map and the immutability principle
default
post
map/content_preview.jpg
Map reactive operator and immutability

Notes

❚ map and all the other reactive programming functions will never modify the input stream. Instead, they return a new stream. This principle is called immutability.

In the video example, ▬ isChecked is used as a project function. This function accepts events from checkable elements: checkboxes, radio buttons, options of a menu, toggles, etc. It returns ✔ true if the element is checked, ✘ false otherwise.

When an action is performed on the toggle (on→off or off→on), a toggle event is emitted (read a stream of toggle events).