Lifecycle Methods

Hook actions to specific moments in a component's life

Start[missing "en.views.course_landing_page.react-102.course_illustration" translation]
Chevron Left Icon
Mounting Lifecycle Methods
Lesson 1 of 2
Chevron Right Icon
  1. 1

    Lifecycle methods are methods that get called at certain moments in a component's life. You can write a lifecycle method that gets called right before a component renders for the first time. Yo...

  2. 2

    There are three categories of lifecycle methods: mounting, updating, and unmounting. This lesson is about the first category: mounting lifecycle methods. A component "mounts" when it ren...

  3. 3

    The first mounting lifecycle method is called [...] . When a component renders for the first time, [...] gets called right before render. Look at Example.js, and follow these steps: ...

  4. 4

    [...] is a lifecycle method! We won't go over [...] here - we've already talked about it plenty. However, you should understand how [...] fits into the mounting period. Whenever a compon...

  5. 5

    The final mounting lifecycle method is called [...] . When a component renders for the first time, [...] gets called right after the HTML from [...] has finished loading. Look in the code ...

  1. 1

    There are two categories that we haven't yet discussed: updating and unmounting lifecycle methods. This lesson covers both. What is updating? The first time that a component instance rende...

  2. 2

    The first updating lifecycle method is called [...] . When a component instance updates, [...] gets called before the rendering begins. As one might expect, [...] only gets called if the c...

  3. 3

    The second updating lifecycle method is called [...] . When a component updates, [...] gets called after [...] , but still before the rendering begins. Look at Example.js in the code ed...

  4. 4

    The third updating lifecycle method is [...] . [...] gets called in between [...] and [...] . [...] receives two arguments: [...] and [...] . Read [...] in the code editor to see it...

  5. 5

    The last updating lifecycle method is [...] . When a component instance updates, [...] gets called after any rendered HTML has finished loading. Look at [...] for an an example of [...] ....

  6. 6

    A component's unmounting period occurs when the component is removed from the DOM. This could happen if the DOM is rerendered without the component, or if the user navigates to a different web...

  7. 7

    Congratulations on making it to the end of our Introductory React courses! By this point, you have acquired all of the tools that you need to program in React! However, you aren't quite done with...

Lifecycle Methods

Start[missing "en.views.course_landing_page.react-102.course_illustration" translation]