1.Virtual DOM
1. Map all the content of the Web page to a hierarchical object model of a tree structure, the browser provides support for the DOM, the user can use the script call Dom,api to dynamically modify the DOM node, so as to achieve the purpose of modifying the Web page, this modification is done by the browser, The browser redraws the changed DOM node section according to the DOM's changes 2. The cost of modifying DOM redraw rendering is too high, the front-end frame to improve efficiency, minimize DOm redraw, proposed virtual DOM, all the modifications are made on the Virutal DOM, through the comparison algorithm , to find the difference between browser DOM, using this difference to manipulate the DOM, the browser only needs to render part of the changes can be react implementation of the DOM diff algorithm can effectively compare the virtual DOM and Dom differences
2.JSX syntax
JSX is a JAVASCRI and XML write-down syntax, is the extension of JavaScript JSX specification tag in the first letter lowercase is the HTML tag, the first letter capitalized is the formation of strict requirements of HTML tags, all tags must be closed, BR should Ctrip <br/> Single line omit parentheses, multiple lines use the parentheses element to have multiple lines, build multiple lines, and note the indent JSX expression: use {}, if the curly braces use quotation marks, they are treated as strings
The jsx&react of JavaScript