Chapter 5. React component lifecycle events

This chapter covers

  • Getting a bird’s-eye view of React component lifecycle events
  • Understanding event categories
  • Defining an event
  • Mounting, updating, and unmounting events

Chapter 2 provided information about how to create components, but there are certain situations in which you need more granular control over a component. For instance, you may be building a custom radio button component that can change in size depending on the screen width. Or perhaps you’re building a menu that needs to get information from the server by sending an XHR request.

One approach would be to implement the necessary logic before instantiating a component and then re-create it by providing different properties. ...

Get React Quickly: Painless web apps with React, JSX, Redux, and GraphQL now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.