Reading-Notes

Class 02 Notes

State and Lifecycle

Converting a Function to a Class:

Adding Local State to a Class:

  1. replace this.props whith this.state.date in the method.
  2. add a class constructor to assign the this.state initial.
  3. remove the data props from the element.

Example

Handling Events:

Passing Arguments to Event Handlers:

HandlingEvent

Conditional Rendering:

Element Variables

Preventing Component from Rendering:

The Sorces:

state-and-lifecycle

handling-events

conditional-rendering