O'Reilly logo

JavaScript at Scale by Adam Boduch

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

Component optimization

Now that we've fixed our component communication performance bottlenecks, it's time to look inside our components, at the implementation specifics and the performance issues they may present. For example, maintaining state is a common requirement of JavaScript components, however, this does not scale well performance-wise because of all the book-keeping code required. We also need to be aware of side effects introduced by functions that mutate data that other components use. Finally, the DOM itself, and the way our code interacts with it, has much potential for unresponsiveness.

Components that maintain state

Most components in our code need to maintain state, and this is unavoidable for the most part. For example, if our ...

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