WeCodeAcademy

What is React?

React is a JavaScript library for building user interfaces out of small, reusable pieces called components. A component is a function that returns what should appear on screen. When your data changes, React updates the page for you.

In these lessons the example code runs live in your browser. Define a component named App and it is shown in the result panel. The React hooks (useState, useEffect and friends) are already available, so you do not need import lines.

Examplereact
Open in editor »

The HTML-looking part is JSX. It is JavaScript in disguise, and the next lessons explain it. Change the text and Run again.

Quick check

What is a React component?

Finish the quick check (and any code exercise) to complete this lesson, or mark it done yourself.

Tip: use the left and right arrow keys to move between lessons.