In this chapter, you learned how to use Immutable.js collections as a tool to aid in declarative decision making. Maps are the foundation of this idea, because you can use them to look up a behavior to run based on keys. They also allow you to run default behavior when nothing is found—kind of like an else block.

You also learned how to compose complex behavior that models logical AND/OR decisions. Once again, Immutable.js collection methods helped us here. With these two things in place, you composed complex application behavior in an easy-to-understand way.

In the next chapter, we'll use side-effects to render actual UI elements.

Get Mastering Immutable.js now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.