3 Matching Annotations
- Sep 2019
-
cloudreports.net cloudreports.net
-
const forceUpdate = () => useState(0)[1];
-
-
stackoverflow.com stackoverflow.com
-
const [, updateState] = React.useState(); const forceUpdate = React.useCallback(() => updateState({}), []);
-
const [value, set] = useState(true); //boolean state return () => set(!value); // toggle the state to force render
-