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.

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b31c2b-2b539.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b31c2b-2b539.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?