O'Reilly logo

Developing a React Edge, 2nd Edition by Simon Højberg, Frankie Bagnardi, Richard Feldman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 16. Immutability

An increasingly popular way to use React is in conjunction with immutable data structures—that is, data structures that never change after they are instantiated.

Whether immutability is right for your application, and if so, which immutability library to adopt, depends on the specifics of your use case. In this chapter we will cover the benefits and costs of immutability, and look at three different libraries you can use to incorporate it into your React application.

Performance Benefits

The most clear-cut benefit of immutability in a React application is what it does for shouldComponentUpdate. Although shouldComponentUpdate can provide great performance improvements, those improvements are often eroded or even erased ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required