O'Reilly logo

Developing a React Edge: The JavaScript Library for User Interfaces by The League of Extraordinary Developers

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 6. Composing Components

In traditional HTML the basic building block of each page is an element. In React you assemble a page from components. You can think of a React component as an HTML element with all the expressive power of JavaScript mixed in. In fact with React the only thing you do is build components, just like an HTML document is build with only elements.

Since the entirety of a React app is build using components, this whole book can be described as a book about React components. Therefore in this chapter we won’t cover everything to do with components. Rather you will be introduced to one specific aspect — their composability.

A component is basically a JavaScript function that takes in props and state as its arguments and ...

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