in React JS by
Q:
what is shouldComponentUpdate method?

▼ Show 1 Answer

0 votes
by

Determines if the component will be updated or not. By default it returns true. If you are sure that the component doesn't need to render after state or props are updated, you can return false value. It is a great place to improve performance as it allows you to prevent a re-render if component receives new prop.

React JS
Learn More with Madanswer

Related questions

0 votes
asked Jul 2, 2019 in React JS by Venkatshastri
...