Which method in a react component should you override to stop the component from updating?


Question: Which method in a react component should you override to stop the component from updating?

You should override shouldComponentUpdate method in react component to prevent component from updating. Because the shouldComponentUpdate method allows us to break out of the complex react update lifecycle to avoid calling it repeatedly on every re-render.

Answer By Rjwala Rjwala is your social learning platform. here our team solve your academic problems daily.

0 Komentar

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2