Join Eve Porcello for an in-depth discussion in this video The component lifecycle, part of Learn React.js: The Basics.
- [Instructor] The component lifecycle provides hooks…for creation, lifetime, and teardown of components.…These methods allow you to do things like…add libraries, load data, and more at very specific times.…The mountain lifecycle has several methods…that we've used already.…For example, getInitialState is going to be called once…and will set the default for a state.…componentWillMount is called right before the render,…and it's the last chance to effect state…prior to the render.…The render method we know well, this is the only…required method, and componentDidMount is going to…fire right after the render, so after a successful render,…we can now access the dom, the component has been rendered,…and now the user can interact with it.…
The component lifecycle also provides methods for updating.…componentWillReceiveProps, once this method is called,…we get the opportunity to change the object…and effect state.…shouldComponentUpdate and componentWillUpdate…are invoked right before rendering,…and are often used for optimization.…
- What is React.js?
- Introducing JSX
- Creating a React component
- Handling events
- Using state
- Working with PropTypes
- Adding child elements
- Mounting and updating components
- Creating a React.js app
Skill Level Beginner
Building a Web Interface with React.jswith Ray Villalobos1h 21m Intermediate
1. What Is React.js?
2. Getting Started
3. React Components
4. Props and State
5. Enhancing Components
6. Creating an App
Using create-react-app4m 38s
Next steps1m 4s
- 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.