Reactnative Essay One

Source: Internet
Author: User

---restore content starts---

1, Reactdom.render ()    react The most basic method, used to convert the template to HTML language, and insert the specified DOM node to insert the H tag into the example node 2, the HTML language is written directly in the JavaScript language, Without any quotation marks, it is the syntax of JSX. 3. Create the component.   React.createclass ({})  -----Receive an object   property render returns the defined component   render: Reactdom.render (component, where to place the component (position), A callback after rendering is complete)   Full code: Var hellomessage=react.createclass ({             alertme:function () {             alert ("You click me!!!");             },             render:function () {             return  ( Note:The first letter must be capitalized when the component name is declared, if it is not renderedIf this error is reported in the console: Failed to locate workspace file mapped to URL file:///D:/%E4%B8%AA%E4%BA%BA%E6%96%87%E4%BB%B6%E5%A4% b9/desktop/reactdemoself/demo1/embedded from source Map file:///D:/%E4%B8%AA%E4%BA%BA%E6%96%87%E4%BB%B6%E5%A4%B9/ Desktop/reactdemoself/demo1/index2.htmlThe reason is that your parent folder has Chinese characters, so you don't report such mistakes in English.

---restore content ends---

Reactnative Essay One

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.