The smallest React example looks like this:
ReactDOM.render( <h1>Hello, world!</h1>, document.getElementById('root') );
It displays a heading saying “Hello, world!” on the page.
Click the link above to open an online editor. Feel free to make some changes, and see how they affect the output. Most pages in this guide will have editable examples like this one.
How to Read This Guide
In this guide, we will examine the building blocks of React apps: elements and components. Once you master them, you can create complex apps from small reusable pieces.
Knowledge Level Assumptions