Download slate/packages/slate-react/src/hooks/use-composing.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 328 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/slate/packages/slate-react/src/hooks/use-composing.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/slate/packages/slate-react/src/hooks/use-composing.ts
-
curl -L -o use-composing.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/slate/packages/slate-react/src/hooks/use-composing.ts
328 Bytes
| import { createContext, useContext } from 'react' | |
| /** | |
| * A React context for sharing the `composing` state of the editor. | |
| */ | |
| export const ComposingContext = createContext(false) | |
| /** | |
| * Get the current `composing` state of the editor. | |
| */ | |
| export const useComposing = (): boolean => { | |
| return useContext(ComposingContext) | |
| } | |