MCPcopy Index your code
hub / github.com/thebuilder/react-intersection-observer / getActFn

Function getActFn

src/test-utils.ts:70–86  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

68}
69
70function getActFn() {
71 if (
72 !(
73 typeof window !== "undefined" &&
74 // @ts-expect-error
75 window.IS_REACT_ACT_ENVIRONMENT
76 )
77 ) {
78 return undefined;
79 }
80 // biome-ignore lint/suspicious/noTsIgnore: Needed for compatibility with multiple React versions
81 // @ts-ignore
82 return typeof React.act === "function"
83 ? // @ts-ignore
84 React.act
85 : DeprecatedReactTestUtils.act;
86}
87
88function warnOnMissingSetup() {
89 if (isMocking()) return;

Callers 1

triggerIntersectionFunction · 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…