Do the mounting lifecycle methods run more than once in a component's life?

Question

In the context of this exercise, do the mounting lifecycle methods run more than once in a component’s life?

Answer

No, the mounting lifecycle methods (excluding render) are only run once in the entire life of a component.

This is because a component instance can only be mounted once and can never be mounted a second time. It is not possible to unmount and then “remount” a component, because once the component is unmounted it is permanently “destroyed” and cannot be mounted again.

1 Like