Chapter 2. <Hello World />: our first component

This chapter covers

  • Thinking about user interfaces with components
  • Components in React
  • How React renders components
  • Different ways of creating components in React
  • Using JSX in React

Chapter 1 talked about React in mostly theoretical terms. If you’re a “show me the code!” kind of person, this chapter is for you. We’ll start looking at React up close in this chapter. As we get into some of React’s API, you’ll build a simple comment box that will help you see the mechanics of React in action and start to solidify a mental model of how React works. We’ll start by building React components without any “syntactic sugar” or conveniences that might obscure the underlying technology. We’ll explore JSX ...

Get React in Action now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.