1
2**** You can simply define the useState like that ****
3
4const [, forceUpdate] = React.useState(0);
5 ==== >> And usage: forceUpdate(n => !n)
6
7
8
9
1const [, updateState] = React.useState();
2const forceUpdate = React.useCallback(() => updateState({}), []);
3