Installation

React has been designed from the start for gradual adoption, and you can use as little or as much React as you need. Whether you want to get a taste of React, add some interactivity to an HTML page, or start a complex React-powered app, this section will help you get started.

Try React

You don’t need to install anything to play with React. Try editing this sandbox!

function Greeting({ name }) {
  return <h1>Hello, {name}</h1>;
}

export default function App() {
  return <Greeting name="world" />
}

We use sandboxes throughout these docs as teaching aids. Sandboxes can help familiarize you with how React works and help you decide if React is right for you. Outside of the React documentation, there are many online sandboxes that support React: for example, CodeSandbox, Stackblitz, or CodePen.

Try React locally

To try React locally on your computer, download this HTML page. Open it in your editor and in your browser!

Add React to a page

If you’re working with an existing site and just need to add a little bit of React, you can add React with a script tag.

Start a React project

If you’re ready to start a standalone project with React, you can set up a minimal toolchain for a pleasant developer experience. You can also start with a framework that makes a lot of decisions for you out of the box.

Next steps

Where you start depends on how you like to learn, what you need to accomplish, and where you want to go next! Why not read Thinking in React—our introductory tutorial? Or you can jump to Describing the UI to play with more examples and learn each topic step by step. There is no wrong way to learn React!