• 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/useInstantEffect.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 { useRef, type DependencyList } from 'react';
7
import { shallowCompareArrays } from '@ckeditor/ckeditor5-integrations-common';
8

9
/**
10
 * Triggers an effect immediately if the dependencies change (during rendering of component).
11
 *
12
 * @param fn The effect function to execute.
13
 * @param deps The dependency list.
14
 */
15
export const useInstantEffect = ( fn: VoidFunction, deps: DependencyList ): void => {
8✔
16
        const prevDeps = useRef<any>( null );
412✔
17

18
        if ( !shallowCompareArrays( prevDeps.current, deps ) ) {
412✔
19
                prevDeps.current = [ ...deps ];
236✔
20
                fn();
236✔
21
        }
22
};
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