( semaphore: Pick<LifeCycleElementSemaphore<R>, 'runAfterMount'> | null, fn: ( mountResult: R ) => void, deps: DependencyList )
| 12 | * `useEffect` alternative but executed after mounting of editor. |
| 13 | */ |
| 14 | export const useInstantEditorEffect = <R>( |
| 15 | semaphore: Pick<LifeCycleElementSemaphore<R>, 'runAfterMount'> | null, |
| 16 | fn: ( mountResult: R ) => void, |
| 17 | deps: DependencyList |
| 18 | ): void => { |
| 19 | useInstantEffect( () => { |
| 20 | if ( semaphore ) { |
| 21 | semaphore.runAfterMount( fn ); |
| 22 | } |
| 23 | }, [ semaphore, ...deps ] ); |
| 24 | }; |
no test coverage detected
searching dependent graphs…