Book Image

Mastering Immutable.js

By : Adam Boduch
Book Image

Mastering Immutable.js

By: Adam Boduch

Overview of this book

Immutable.js is a JavaScript library that will improve the robustness and dependability of your larger JavaScript projects. All aspects of the Immutable.js framework are covered in this book, and common JavaScript situations are examined in a hands-on way so that you gain practical experience using Immutable.js that you can apply across your own JavaScript projects. The key to building robust JavaScript applications using immutability is to control how data flows through your application, and how the side-effects of these flows are managed. Many problems that are difficult to pinpoint in large codebases stem from data that’s been mutated where it shouldn’t have been. With immutable data, you rule out an entire class of bugs. Mastering Immutable.js takes a practical, hands-on approach throughout, and shows you the ins and outs of the Immutable.js framework so that you can confidently build successful and dependable JavaScript projects.
Table of Contents (23 chapters)
Title Page
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface

Summary


In this chapter, you learned how to design and implement an architecture for your Immutable.js abstraction. We started by building a reusable component that takes the initial application state and side-effect functions as arguments and returns an updater function, which is then used throughout the application to update the application state. This component runs the appropriate side-effect whenever state changes.

Then you implemented another version of the application from Chapter 14, Side-Effects in User Interfaces, where we listed Black Mirror episodes. This implementation used our new App() component to encapsulate immutable state and to orchestrate the execution of our side-effect functions.

I hope this has been an enlightening read. I set out to write this book with the hope of sharing some of my hard-earned knowledge working with Immutable.js in production for many years. With the skills you've picked up in this book, I'm confident that you'll be able to tackle any problem that...