- [Instructor] The React component lifecycle…provides functions that are invoked at specific times…during the rendering lifecycle.…Let's explore some of these.…To understand the component lifecycle more,…I really like this handy chart.…It describes all of the functions…that are called right before a component mounts,…whenever a component updates, and when it unmounts.…So mounting and unmounting just means whenever it's added…to the dom, and whenever it's taken away.…So if I go back to our code, and I look…at our library component, I can add some…of our component lifecycle methods to this class.…
Component lifecycle methods are only available…when using class syntax, so you can't use them…with function components.…Now the only required method…of the component lifecycle is render.…Whenever the props or state of the app changes,…render will be called.…The next method is the constructor.…So if I had a constructor here,…instead of initializing state as this static property,…the constructor is called before the component is mounted,…
- Refactoring elements with JSX
- Creating components
- Adding component properties and methods
- Displaying child components
- Working with props and state
- Conditional rendering
Skill Level Intermediate
1. What Is React?
2. Introduction to React Elements
3. React Components
4. Props and State
5. Additional Library Features
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.