React Getting Started-JSX

Source: Internet
Author: User
Tags javascript extension one more line

Web Technology Three musketeers: HTML, CSS and Javascript!

HTML is the simplest of the three, is a structured document, the use of markup Language (Markup Language) performance is the content of the document;

followed by CSS, CSS core is box module (box model) and positioning, CSS relies on HTML elements, can only attach to the HTML and the appropriate cosmetic rendering, can only decorate the content but not the HTML element itself.

The most complex is JavaScript, which can be fully controlled for HTML and CSS, adding changes to any element and content.

JavaScript is a programming language (programming Language) that writes real programs.

Using JavaScript often mixes HTML and JavaScript, and sometimes it's hard to tell or define whether the code is part of JavaScript or HTML.

Now react formally defines this code for writing JavaScript and HTML together as JSX, JavaScript eXtension!

JSX is a new way of react element, and react element created by JSX can be combined in element manner.

You can use JSX to create reusable, granular elements, and combine them to form more granular components, divided by business logic.

Example

<! DOCTYPE html>

This example differs from the previous example in that there is one more line of references

<script src= "Https://unpkg.com/babel-standalone@6.15.0/babel.min.js" ></script>

Because all of the react introductory articles are examples that can be copied directly to the local, and then run locally, to see the effect.

And more of this line, the role is to allow JSX in the browser normal operation.
Do not believe, you can in the normal running of the page, delete this line, the original can display the text became nothing.

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.