Chapter 4. Creating Your First React Component
In the previous chapter, you learned how to create React elements and how to use them to render the HTML markup. You saw how easy it is to produce React elements using JSX. At this point, you know enough about React to create static web pages, which we discussed in Chapter 3, Creating Your First React Element. However, I bet that's not the reason why you've decided to learn React. You don't want to just build websites made of static HTML elements. You want to build interactive user interfaces that react to user and server events. What does it mean to react to an event? How can a static HTML element react? How can a React element react? In this chapter, we'll answer these questions and many other questions while introducing ourselves to React components.