DEV Community

Discussion on: Constructors in Functional Components With Hooks

 
bytebodger profile image
Adam Nathaniel Davis • Edited

dev.to/spukas/4-ways-to-useeffect-pf6

This article right here on Dev.to is pretty handy - so much so that I stuck it in my reading list. A constructor is ultimately a lifecycle method. And in Hooks, there is exactly one lifecycle method - useEffect(). As the name implies, there is no such thing as a useEffect() call that runs before the component renders (since, an "effect" has to happen... after something else). And as the article above implies, useEffect() can actually be used four different ways - although I don't personally believe that any of them are intuitive just by reading the names/arguments.