React:
1,react.render is the most basic method of React for converting a template to an HTML language and inserting a specified DOM node
The 2,react.createclass method is used to generate a component class
The properties of the 3,this.props object correspond to the properties of the component one by one This.props.children property represents all child nodes of the component
4,react.finddomnode the node that gets the real DOM from the component
5,this.state Methods for reading components This.setstate setting up components
6,this.props represents features that are not changed once defined, whereas This.state is a feature that changes as users interact
7,event.target.value read user-entered values
8,style={{display: ' None '}}
9,props data passed from a parent node to a child node
10,getinitialstate () Sets the initialization state of a component only once during the lifetime of the component
11,componentdidmount is a method that react automatically calls when a component is rendered
12, use the ref attribute to name the subassembly, this.refs reference the component. Call Getdomnode () on the component to get the local DOM element of the browser
13,row (transverse scaling) and column (longitudinal scaling)
The 14,react width is based on PT and can be dimensions to obtain a wide height, pixelratio get the density
The view default width is 100%
Horizontal Center with Alignitems, vertical center with justifycontent
Flex-based enables existing grid system requirements, and grids can be nested without bugs
16, through the Image.resizemode to fit the picture layout, including contain, cover, stretch
Default mode is not set equal to cover mode
Contain mode adaptive wide-height, give the altitude value can be
Cover are covered with containers, but they do intercept.
Stretch covered with container, stretched
17, Position relative to parent element, parent element not set position also line
Padding there is a bug when setting on the text element. All padding become marginbottom.
18, the text must be placed inside the text element
Text elements can be nested with each other, and there is a style inheritance relationship
The numberoflines needs to be placed on the outermost text element, and while the text is truncated, it takes up space
React notes (update)