1. Type null undefined Boolean that cannot be displayed in {}

State ={flag:true} {this.state.flag?” Nihao “:null} or {flag && ‘nihao’}

(2) How to render: to string

this.state={ test1 = null, test2 = undefined, test3 = true }

2. Objects cannot be subclasses of JSX

person:{ name:”sdf”, age:65, }

Direct error

3. Embed expressions

function

5. Conditional judgment

6. Filter traversal

To simplify the

7. Capture

8. Type verification

Class component adds propTypes

9. The father the son

10. Slot

11. Multiple components pass values using… Props to pass

12.context

Functional component

nested

13. SetState is designed to be asynchronous

Catch changes in time

14 Merge and accumulate

15 Controlled components <select name=”fruits” value={this.state.fruits} onChange={e= > this.handlechange (e)}> value Sets the default value

When multiple form elements process input data, use “name” to extract common code

16 Advanced component login detection

17 protals

Use Fragment when DIV does not need to be wrapped around it

Or you can use phrasing, but phrasing cannot add any attributes

To optimize performance, add key to list, but phrase method cannot add attribute, error

19 Use the template string to call the function

For styled-compoents, active in span should be used &

Use variables to change styles dynamically

1.

2. Note: Labels must be components. Figure 3 does not work

invalid

Shared data

21 Dynamically add classes

Use classnames import classnames from ‘classnames’

If this.state.titile is converted to a Boolean value of false, it is not displayed