"React" hot warm-up: Hello World

Source: Internet
Author: User

Introduction of React

You can use Bower to download react

bower install react

Introduced react(.min).js and JSXTransformer.js . You can not use JSX in react components, but JSX is recommended. The introduction of the Jsxtransformer.js Library is to implement the code conversion in the browser, it is best to convert the JSX code into normal JS code, and then remove JSXTransformer.js the reference.

JSX code is written in <script type="text/jsx"> , note type is text/jsx .

JSX-JS
npm install -g react-toolsjsx --watch src/ build/

Once the jsx file in SRC has been modified, it is automatically converted to the build folder.

Hello World

One of the simplest react components.

HTML file

<!DOCTYPE html>

Main.js file

var HelloWorld = React.createClass({ render: function () { return 

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

"React" hot warm-up: Hello World

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.