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 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 of 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 built with only elements. 

Since the entirety of a React application is built 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 ...

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