Based on Chapter 12 of Pro-React-16
See React documentation: SyntheticEvent
- Run
npm install
to install dependencies - Run
npm start
to start the development server
1. Preparation
- Sets up a new app
- Adds bootstrap
- Creates new App component to display basic initial view
- Adds onClick event to button
- Invokes method to handle event
- Differentiates between different Event Types
- Uses persist method to avoid Event Reuse Pitfall
- SyntheticEvents reset properties to null after event is handled
- Uses custom argument to invoke event handler
- Prevents Default Behaviour
- Understanding Target and Bubble Phases
- Understanding the Capture Phase
- Determining the Event Phase
- Stopping Propagation