File size: 328 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
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)
}
|