Is there any problem with using PureComponent in React or is there any hole in PureComponent?

PureComponent is a shallow comparison in shouldComponentUpdate

using PureComponent can avoid a lot of useless calculations when the component renders again. Is there any problem or pit in using PureComponent in practice?

according to my understanding, as long as immutable is satisfied, there should be no problem

Nov.09,2021

Yes, as long as immutable is satisfied, there will be no problem, so it is suitable for immutable.js to use.
pit, you can think of immutable and shouldComponentUpdate shallow comparison, probably can also think of, that is, state or props is a reference type, if you directly change the internal properties, instead of returning a new reference, there will be a problem.
for example:

const foo = this.state.arr;
foo.push(5);
this.setState({
    arr: foo,
})

because foo is arr , when shallow comparison, it will return false , but will not re- render

.
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-1b370ad-2c056.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-1b370ad-2c056.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?