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

Chapter 4. Component Communication and Responsibilities

The preceding chapter focused on the what of components—what are they composed of and why. This chapter focuses on the glue in between our JavaScript components—the how. If our components are designed with a particular purpose in mind, then they need to communicate with other components to realize larger behavior. For example, a router component is unlikely to update the DOM or talk to the API. We have components that are good at those tasks, so other components can ask them to perform them, by communicating with them.

We'll start the chapter off with a look at communication models prevalent in frontend development. It's highly unlikely that we'll develop our own framework for inter-component ...

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