2

React doc says:

If you’re familiar with React class lifecycle methods, you can think of useEffect Hook as componentDidMount, componentDidUpdate, and componentWillUnmount combined.

But what if I want to invoke a logic that has to be triggered before component mounts?

Marco Bonelli
  • 63,369
  • 21
  • 118
  • 128
sudheer singh
  • 862
  • 1
  • 9
  • 23

0 Answers0