Andrey (azangru) wrote,
Andrey
azangru



Oh fuck you React! You told us that useEffect with an empty array of dependencies is the new way of modelling the componentDidMount lifecycle hook; you told us that the cleanup function from useEffect is the new way of modelling the componentWillUnmount lifecycle hook; and now you are telling us to stop treating an empty array as a semantic guarantee? How do we do stuff we want to do just once on mounting/unmounting components then?

(source)
Subscribe

  • Post a new comment

    Error

    default userpic
    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 24 comments