React Get Started


React is javascript library to build UI.
React is component-based.

Get started

To make React app, there are a lot of ways. So far,there are no standard way and people select their own way to make it.

In this entry, I introduced simple ways for learning at first.

  • Compiled javascript from React

Easy way to learn is reading React tutorial Tutorial React
But tutorial codes skip some parts to run on the local. I tried to run all on the local by filling skip parts.

Anyway, as first step, prepare environment first React app.

Compiled javascript from React

React prepares compiled javascript for learning.
This is just simple javascript library set. We can use them by importing.

We can download Starter Kit from
This starter kit includes compiled react and react-dom
Starter kit is easy to use.

Project structure

|- react-15.3.1
|     |- build
|          |- react.js
|          |- react-dom.js
|- src
|   |- helloworld.js
|- helloworld.html


This is entry html

<!DOCTYPE html>
        <meta charset="UTF-8"/>
        <title>Hello React</title>
        <script src="react-15.3.1/build/react.js"></script>
        <script src="react-15.3.1/build/react-dom.js"></script>
        <script src=""></script>
        <div id="example"></div>
        <script type="text/babel" src="src/helloworld.js"></script>

Import react and react dom from react starter kit
And use babel-core browser.min.js to work with jsx.

HTML body has div and script tag.
script type is babel. src/helloworld.js source is jsx based.
Let’s take a look.


<h1>Hello world!</h1>,

Render dom in div

Back to helloworl.html, this js is not pure javascript.
The code is jsx.

※ I use webstrom as editor. jsx code should have .jsx prefix. helloworld.js is recognized as js, so IDE warns. Of course, we can change from .js to .jsx

Tutorial template

To work with tutorial from React, we need template.
React source file and some other useful libs to learn React is included.
This is template

<!DOCTYPE html>
    <meta charset="utf-8" />
    <title>React Tutorial</title>
    <script src=""></script>
    <script src=""></script>
    <script src=""></script>
    <script src=""></script>
    <script src=""></script>
<div id="content"></div>
<script type="text/babel" src="src/tutorial1.jsx"></script>

To change src/tutorial1.jsx, we can run react on the local.
Preparation was done. Let’s learn React.