Learn about component lifecycle methods for mounting and unmounting events and what they are helpful for.
- [Narrator] Every React component has a life cycle.…First it gets mounted in the DOM.…Then the content of this component…might get updated at some point.…And then the component might actually…be removed from the DOM.…We can write custom code around these events…in the life cycle of a component…to customize the behavior.…We use React life cycle methods to do that.…There are a few life cycle methods…that I'd like to talk about here.…
The most important one is componentDidMount.…This is the life cycle method…that guarantees that the DOM has been mounted…in the browser successfully.…Another component life cycle method…is componentWillUnmount.…This is the life cycle method that says…the component is about to be unmounted.…I'm going to put a console.log line here,…and another one in will unmount.…And after both of them I'm going to…put a debugger statement.…
Don't worry about the ESLint warnings,…these are just temporary.…So now when we refresh you'll notice one thing.…First we are in did Mount,…and you'll notice that the component…
- Configuring webpack and Babel
- Working with native Node modules
- Creating an Express server
- Working with React components and JSX
- Loading and working with test mock data
- Fetching data from a remote API
- Working with data in MongoDB
- Isomorphic rendering on the server
- Front-end routing and back-end routing
Skill Level Advanced
MEAN Stack and MongoDB: Development Techniqueswith Alexander Zanfir1h 48m Intermediate
1. Getting Started
2. Node as a Web Server
3. React Basics
4. Working with Data
5. Rendering on the Server
Fix the checksum problem6m 11s
6. Routing on Client and Server
7. Working with MongoDB
- 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.