Files
react.dev/content/docs/hello-world.md
Alex 7fafb9f916 Break out Installation into top-level doc section (#452)
* Break out Installation into top-level doc section

* Update navigation (prev/next, nav tree)

- Move Installation section to top
- Add next/prev to install pages

* add links to other install options from try react page

* fix markdown link

* Clarify that Quick Start and Install are optional "next steps"

* Add top-level CDN page

This is useful for Codepen and other Unpkg-y setups

* Add link to Tutorial from Try React

* Update CRA link in tutorial

* Make Try React subheader a proper sentence

* Add "minimal"

* Explain local dev setup is more work than Codepen etc

* Fix typos

* Add : between headings

* add note that CRA is not lightweight

* fix typo

* Update add-react-to-a-new-app.md

* Update add-react-to-a-new-app.md

* Remove the Bower note

* Update try-react.md

* Tweak wording

* Use direct link
2017-12-23 15:37:23 +00:00

2.1 KiB

id, title, permalink, prev, next, redirect_from
id title permalink prev next redirect_from
hello-world Hello World docs/hello-world.html cdn-links.html introducing-jsx.html
docs/
docs/index.html
docs/getting-started.html
docs/getting-started-ko-KR.html
docs/getting-started-zh-CN.html

The easiest way to get started with React is to use this Hello World example code on CodePen. You don't need to install anything; you can just open it in another tab and follow along as we go through examples. If you'd rather use a local development environment, check out the Installation section.

The smallest React example looks like this:

ReactDOM.render(
  <h1>Hello, world!</h1>,
  document.getElementById('root')
);

It renders a header saying "Hello, world!" on the page.

The next few sections will gradually introduce you to using React. 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.

A Note on JavaScript

React is a JavaScript library, and so it assumes you have a basic understanding of the JavaScript language. If you don't feel very confident, we recommend refreshing your JavaScript knowledge so you can follow along more easily.

We also use some of the ES6 syntax in the examples. We try to use it sparingly because it's still relatively new, but we encourage you to get familiar with arrow functions, classes, template literals, let, and const statements. You can use the Babel REPL to check what ES6 code compiles to.