Download JoL-player/src/utils/useMandatoryUpdate.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 189 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/f5071caa249115f3b590492f1c8eb471e02aae4b/JoL-player/src/utils/useMandatoryUpdate.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset@f5071caa249115f3b590492f1c8eb471e02aae4b/JoL-player/src/utils/useMandatoryUpdate.ts
-
curl -L -o useMandatoryUpdate.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/f5071caa249115f3b590492f1c8eb471e02aae4b/JoL-player/src/utils/useMandatoryUpdate.ts
189 Bytes
| import { useReducer } from 'react'; | |
| const useMandatoryUpdate = () => { | |
| const [, forceUpdate] = useReducer((v) => v + 1, 0); | |
| return forceUpdate; | |
| }; | |
| export default useMandatoryUpdate; | |