MCPcopy Create free account
hub / github.com/react-component/select / useLayoutEffect

Function useLayoutEffect

src/hooks/useLayoutEffect.ts:8–16  ·  view source on GitHub ↗
(effect: React.EffectCallback, deps?: React.DependencyList)

Source from the content-addressed store, hash-verified

6 * Wrap `React.useLayoutEffect` which will not throw warning message in test env
7 */
8export default function useLayoutEffect(effect: React.EffectCallback, deps?: React.DependencyList) {
9 // Never happen in test env
10 if (isBrowserClient) {
11 /* istanbul ignore next */
12 React.useLayoutEffect(effect, deps);
13 } else {
14 React.useEffect(effect, deps);
15 }
16}
17/* eslint-enable */

Callers 3

SelectSelectorFunction · 0.85
index.tsxFile · 0.85
MySelectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…