--- id: installation title: Installation permalink: docs/installation.html redirect_from: - "downloads.html" - "docs/tooling-integration.html" - "docs/package-management.html" - "docs/language-tooling.html" - "docs/environments.html" next: hello-world.html --- React is flexible and can be used in a variety of projects. You can create new apps with it, but you can also gradually introduce it into an existing codebase without doing a rewrite. ## Trying Out React If you're just interested in playing around with React, you can use CodePen. Try starting from [this Hello World example code](http://codepen.io/gaearon/pen/rrpgNB?editors=0010). You don't need to install anything; you can just modify the code and see if it works. If you prefer to use your own text editor, you can also download this HTML file, edit it, and open it from the local filesystem in your browser. It does a slow runtime code transformation, so don't use it in production. ## Creating a Single Page Application [Create React App](http://github.com/facebookincubator/create-react-app) is the best way to starting building a new React single page application. It sets up your development environment so that you can use the latest JavaScript features, provides a nice developer experience, and optimizes your app for production. ```bash npm install -g create-react-app create-react-app hello-world cd hello-world npm start ``` Create React App doesn't handle backend logic or databases; it just creates a frontend build pipeline, so you can use it with any backend you want. It uses Webpack, Babel and ESLint under the hood, but configures them for you. ## Adding React to an Existing Application ### Using npm We recommend using React from npm with a bundler like [Browserify](http://browserify.org/) or [webpack](https://webpack.github.io/). If you use npm for client package management, you can install React with: ```bash npm install --save react react-dom ``` and import it from your code with something like: ```js import React from 'react'; import ReactDOM from 'react-dom'; ReactDOM.render(