Book Image

React.js Essentials

By : Artemij Fedosejev
Book Image

React.js Essentials

By: Artemij Fedosejev

Overview of this book

Table of Contents (18 chapters)
React.js Essentials
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 3. Create Your First React Component

In the previous chapter, we learned how to create React elements and how to use them to render the HTML markup. You've seen how easy it is to produce React elements using JSX. At this point, you know enough about React in order to create the static web pages that we discussed in Chapter 2, Create 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.