Create a React component using ES2015 class syntax
Describe when it’s appropriate to use a class component
Initialize and update state within a class component
Provide default values for a class component’s props
Add event listeners to elements
Prevent event default behavior
Safely use the this
keyword within event handlers
Describe what the React SyntheticEvent object is and the role it plays in handling events
Create a React class component containing a simple form
Define a single event handler method to handle onChange events for multiple elements
Implement form validations
Describe the lifecycle of a React component
Recall that the commonly used component lifecycle methods include componentDidMount, componentDidUpdate, and componentWillUnmount
Use the componentDidMount component lifecycle method to fetch data from an API
this
keyword
.call()
or .apply()
: We explicitly set the context and give the functions arguments at the same time..bind()
we can explicitly set the context of a function.event.target
event.currentTarget
event.preventDefault();