Will the sub-components of setState update and re-render if the properties have not changed?

is it necessary to re-render the setState later, regardless of whether the data of the sub-component has changed or not? if so, what is the use of the diff algorithm?

Mar.23,2021

renders vdom, compares the vdom generated before and after data changes using the diff algorithm, and finds the operation to minimize dom


normally it will.
if PureComponent is used or processed in shouldComponenetUpdate , then


setState triggers the subcomponent's recalculation vdom, but does not necessarily update dom

.
Menu