• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ckeditor / ckeditor5-react / ca6e1779-8fe0-4d9b-af01-91100ac4e4bc

24 Sep 2024 01:45PM UTC coverage: 100.0%. Remained the same
ca6e1779-8fe0-4d9b-af01-91100ac4e4bc

Pull #536

circleci

martnpaneq
Updated dependency versions to remove warnings.
Pull Request #536: Updated dependency versions to remove warnings.

281 of 281 branches covered (100.0%)

Branch coverage included in aggregate %.

582 of 582 relevant lines covered (100.0%)

70.24 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/src/hooks/useInstantEditorEffect.ts
1
/**
2
 * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
 * For licensing, see LICENSE.md.
4
 */
5

6
import type { DependencyList } from 'react';
7
import type { LifeCycleElementSemaphore } from '../lifecycle/LifeCycleElementSemaphore.js';
8

9
import { useInstantEffect } from './useInstantEffect.js';
10

11
/**
12
 * `useEffect` alternative but executed after mounting of editor.
13
 */
14
export const useInstantEditorEffect = <R>(
4✔
15
        semaphore: Pick<LifeCycleElementSemaphore<R>, 'runAfterMount'> | null,
16
        fn: ( mountResult: R ) => void,
17
        deps: DependencyList
18
): void => {
19
        useInstantEffect( () => {
360✔
20
                if ( semaphore ) {
217✔
21
                        semaphore.runAfterMount( fn );
124✔
22
                }
23
        }, [ semaphore, ...deps ] );
24
};
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc