June 2018
Intermediate to advanced
360 pages
12h 19m
English
Chapter 2. <Hello World />: our first component
Listing 2.3. Using React.createElement
Listing 2.4. Using PropTypes and the render method
Listing 2.5. Adding a nested component
Listing 2.6. Setting initial state
Listing 2.7. Setting up event handlers
Listing 2.8. Using functions as props
Listing 2.9. Mocking out API data
Listing 2.10. Handling comment submissions and iterating over elements
Chapter 3. Data and data flow in React
Listing 3.1. Simple program state
Listing 3.2. Using setState to modify component state
Listing 3.3. Shallow merging with setState
Read now
Unlock full access