3.1. React tutorial

发布时间 : 2025-10-25 13:34:30 UTC      

Page Views: 9 views

Image0

React is a JAVASCRIPT library for building user interfaces.

React is mainly used to build UI, and many people think React isthe V (view) in MVC.

React an internal project that originated from Facebook and was used to build Instagram the website was launched in May 2013.

React with high performance, the code logic is very simple, more and more people have begun to pay attention to and use it.

3.1.1. Characteristics of React

  • 1.Declarative design −React by using the declaration paradigm, the application can be easily described.

  • 2.Efficient −React through the simulation of DOM, the interaction with DOM is minimized.

  • 3.flexible −React works well with known libraries or frameworks.

  • 4.JSX − JSX is an extension of JavaScript syntax. React developers don’t necessarily use JSX, but we recommend it.

  • 5.Component − passes through React building components makes the code easier to reuse and can be well applied in the development of large projects.

  • 6.Data flow − of one-way response React the data flow of one-way response is implemented, thus reducing repetitive code, which is why it is simpler than traditional data binding.

3.1.2. What you need to know before reading this tutorial:

At the beginning of learning React before, you need to have the following basic knowledge:

  • HTML tutorial

  • CSS tutorial

  • JavaScript tutorial

  • ES6 tutorial

3.1.3. The first instance of React

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

This tutorial uses the React version 16.4.0, you can download the latest version at https://reactjs.org/ .

React instance

ReactDOM.render(

Hello, world!

, document.getElementById('example') );
<p>  Or use the  <code class="docutils literal notranslate">  <span class="pre">  create-react-app  </span>  </code>  tools (described in the next chapter)  <code class="docutils literal notranslate">  <span class="pre">  react  </span>  </code>  development environment: </p> 


Example

import React from "react"; import ReactDOM from "react-dom"; function Hello(props) { return 

Hello World!

; } ReactDOM.render(, document.getElementById("root"));

When the browser opens http://localhost:3000/ , it will output:

Hello World! 

《地理信息系统原理、技术与方法》  97

最近几年来,地理信息系统无论是在理论上还是应用上都处在一个飞速发展的阶段。 GIS被应用于多个领域的建模和决策支持,如城市管理、区划、环境整治等等,地理信息成为信息时代重要的组成部分之一; “数字地球”概念的提出,更进一步推动了作为其技术支撑的GIS的发展。 与此同时,一些学者致力于相关的理论研究,如空间感知、空间数据误差、空间关系的形式化等等。 这恰好说明了地理信息系统作为应用技术和学科的两个方面,并且这两个方面构成了相互促进的发展过程。