When using antd+react, if the value of setState is a deep copy, it will render immediately, otherwise it will not.

when looking at the official instance of antd, if you see that the value of the setState method is a first-level deep copy of the original state, it will render immediately (I don"t know if it means a deep copy here)

see the asynchronous loading instance of the tree component on the antd official website, where the onLoad method:

as shown in the figure, with the addition of this [.], the data will be rendered immediately after the data is obtained.
if you do not add it, it will not be rendered until you click on it next time.
only knows that the meaning of this writing is a deep copy, but I don"t know why it can achieve the effect of real-time rendering. Thank you.

Feb.28,2021

whether PureComponent, is used or not will be compared when shouldComponentUpdate is triggered for PureComponent,react. For more information, please see https://doc.react-china.org/d.

.
Menu