What's the difference between forceUpdate setState?

what"s the difference between forceUpdate setState?
when to use forceUpdate?
solve?


sometimes your variables are not on the state, such as this.couter , etc. When these variables are changed to the React component, the render will not be re-executed, so you need the component to force the render method to be called.


forceUpdate skips the shouldComponentUpdate step to directly trigger the render method of the component
the official website suggests that forceUpdate should be avoided as much as possible

Normally you should try to avoid all uses of forceUpdate () and only read from this.props and this.state in render ().
https://reactjs.org/docs/reac.
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-1b331b6-2be4e.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-1b331b6-2be4e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?