React can be downloaded and used directly, and many learning examples are provided in the download package.

This tutorial uses version 16.4.0 of React. You can download the latest version on the official website https://reactjs.org/ .

You can also use Staticfile CDN’s React CDN library directly at the following address:




Official CDN address:

<scriptsrc="https://unpkg.com/react@16/umd/react.development.js">script><scriptsrc="
https://unpkg.com/react-dom@16/umd/react-dom.development.js">
<scriptsrc="https://unpkg.com/babel-standalone@6.15.0/babel.min.js">script>

Note: it is very inefficient to use Babel to compile JSX in a browser.

3.2.1. Use an example

The following example outputs Hello, world!

React instance

Hello
React!


ReactDOM.render(

Hello, world!

, document.getElementById('example') );