( target: E['target'], event: E, )
| 51 | * e.g. when focus is within a component as it is unmounted, or when managing focus on mount. |
| 52 | */ |
| 53 | export const dispatchDiscreteCustomEvent = <E extends CustomEvent>( |
| 54 | target: E['target'], |
| 55 | event: E, |
| 56 | ) => { |
| 57 | if (target) ReactDOM.flushSync(() => target.dispatchEvent(event)) |
| 58 | } |
| 59 | |
| 60 | export const useIsomorphicLayoutEffect = |
| 61 | typeof window !== 'undefined' && typeof window.document !== 'undefined' |
no outgoing calls
no test coverage detected
searching dependent graphs…