0

I read about react. I have 2 questions. 1) when exactly should I use componentDidUpdate? because sometimes we can do it with any callback function 2)is it good to perform side effects in button clicked. For example, in button click data is sent to server or document.title changed. Is this good for performance or app itself?

Ek4m
  • 15
  • 7
  • 1
    This is covered in the react docs. https://reactjs.org/docs/react-component.html – Eran Goldin Apr 28 '20 at 10:05
  • if not, this reference provides great visual for lifecycles of a react component https://reactarmory.com/guides/lifecycle-simulators – gema Apr 28 '20 at 10:55

0 Answers0