DEV Community

Cover image for React Lifecycle
Lautaro Suarez
Lautaro Suarez

Posted on

React Lifecycle

Introduction

This would be a simple post about React lifecycle with hooks and react lifecycle with classes.

React lifecycle with hooks.

Image description

React Lifecycle with classes

Image description

Difference

I was wondering just like you about unmounting which in the hooks lifecycle but in this case the unmount will be when we do the clean up with for example useEffect, where inside the useEffect doing the return we are doing the unmounting which is called clean up.

Conclusion

We can do basically the same and in a simpler way with functional components. We just have to know how to do it.

Hope someone found it useFul.

Lautaro

Top comments (0)