Join Eve Porcello for an in-depth discussion in this video Understanding the component life cycle, part of Learn React.js: The Basics (2015).
- When we describe the Component Life Cycle,…we're talking about the times at which…changes in state will occur,…during a component's lifetime.…React provides hooks for creation,…lifetime, and teardown of a component.…getDefaultProps and getInitialState…are called once, and set default…for both Props and State.…componentWillMount is called right before the render,…and this is the last chance to affect…the state, prior to render.…render we've used a lot,…and this is the only required method.…
componentDidMount, after a successful render,…we can now access the DOM.…The component has been rendered,…and the user can now interact with it.…When the state changes, the component can now update.…When componentWillReceiveProps is called,…we get the opportunity to change the object,…and update the state.…shouldComponentUpdate and componentWillUpdate…are invoked right before rendering,…and are often used to enhance performance.…
We also can use render to update our component.…componentDidUpdate fires right after…everything is updated to the DOM.…
- What is React.js?
- Introducing JSX
- Creating a React component
- Handling events
- Using state
- Defining parent/child relationships
- Adding child elements
- Mounting and updating components
- Creating a React.js app
Skill Level Beginner
Up and Running with AngularJS 1with Ray Villalobos1h 20m Intermediate
1. What is React.js?
2. Getting Started
3. React Components
4. Parent/Child Relationships
5. Component Life Cycle
6. Creating an App
Next steps1m 5s
- 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.