React tutorial


React is a JAVASCRIPT library for building user interfaces.
React is mainly used to build UI, many people think that React is MVC in the V (view).
React originated from Facebook's internal project, used to set up Instagram's website, and in May 2013 open source.
React has a high performance, code logic is very simple, more and more people have begun to pay attention and use it.

React features

  • 1. Declarative design- React using the declaration paradigm, you can easily describe the application.
  • 2. Efficient-React through the simulation of the DOM, to minimize the interaction with the DOM.
  • 3. Flexible - React can work well with known libraries or frameworks.
  • 4.JSX - JSX is an extension of JavaScript syntax. React development does not necessarily use JSX, but we recommend using it.
  • 5. Components - React build components, making the code easier to reuse, can be a good application in the development of large projects.
  • 6. One-way response to the data stream - React to achieve a one-way response to the data stream, thereby reducing the duplication of code, which is why it is more simple than traditional data binding.

Before you read this tutorial, you need to know the knowledge:

Before you start learning React, you need the following basics:
  • HTML5
  • CSS
  • JavaScript

React the first instance

In each chapter, you can edit the instance online and click the button to view the results.
This tutorial uses React version 15.4.2, you can in the official website http://facebook.github.io/react/ download the latest version.

React instance

< Div ID = " Example " > </ div > < Script type = " text / Babel " > ReactDOM.render ( < h1 of > ! The Hello, World </ h1 of > , document.getElementById ( 'Example')); </ Script >

try it"


EmoticonEmoticon