0 votes
in ReactJS by
what is shouldComponentUpdate method?

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.

Related questions

0 votes
asked Jul 2, 2019 in ReactJS by Venkatshastri
0 votes
asked Jun 19, 2020 in ReactJS by JackTerrance
...