MCPcopy
hub / github.com/facebook/react / Component

Function Component

packages/react/src/__tests__/ReactStartTransition-test.js:40–49  ·  view source on GitHub ↗
({level})

Source from the content-addressed store, hash-verified

38 let triggerHookTransition;
39
40 const Component = ({level}) => {
41 useUserSpaceSubscription();
42 if (level === 0) {
43 triggerHookTransition = useTransition()[1];
44 }
45 if (level < SUSPICIOUS_NUMBER_OF_FIBERS_UPDATED) {
46 return <Component level={level + 1} />;
47 }
48 return null;
49 };
50
51 await act(() => {
52 ReactTestRenderer.create(<Component level={0} />, {

Callers

nothing calls this directly

Calls 2

useUserSpaceSubscriptionFunction · 0.85
useTransitionFunction · 0.50

Tested by

no test coverage detected