Latest web development tutorials

React Tutorial

React is used to build a user interface JAVASCRIPT library.

React mainly for building UI, many people think React is in MVC V (view).

React originated in Facebook's internal project to set up Instagram website and open in May 2013.

React with higher performance, code logic is very simple, more and more people have started to pay attention and use it.


React Features

  • 1. Declare design -React declaration adopted paradigm, you can easily describe the application.

  • 2. Efficient -React through the DOM analog to minimize interaction with the DOM.

  • 3. Flexible -React can be a good fit with known library or framework.

  • 4.JSX - JSX is an extension of JavaScript syntax.React development necessarily using JSX, but we recommend using it.

  • 5. Components - by React build components, making the code easier to be reused, can be well used in the development of large projects.

  • 6. The one-way flow of data in response to - React to achieve a uni-directional response data stream, thereby reducing the duplication of code, which is why it is simpler than traditional data binding.


Before reading this tutorial, you need to know:

Before starting React, you need the following basics:

  • HTML5
  • CSS
  • JavaScript

The first instance React

In each section, you can edit the online instance, and then click the button to view the results.

This tutorial uses React version is 0.14.7, you can at the official website http://facebook.github.io/react/ download the latest version.

React examples

<Div id = "example"> </ div>
<Script type = "text / babel">
ReactDOM.render (
<H1> Hello, world! </ H1>,
document.getElementById ( 'example')
);
</ Script>

try it"