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

Function Child

packages/react-reconciler/src/__tests__/Activity-test.js:199–207  ·  view source on GitHub ↗
({text})

Source from the content-addressed store, hash-verified

197 // @gate enableActivity
198 it('mounts without layout effects when hidden', async () => {
199 function Child({text}) {
200 useLayoutEffect(() => {
201 Scheduler.log('Mount layout');
202 return () => {
203 Scheduler.log('Unmount layout');
204 };
205 }, []);
206 return <Text text="Child" />;
207 }
208
209 const root = ReactNoop.createRoot();
210

Callers

nothing calls this directly

Calls 4

useLayoutEffectFunction · 0.50
useStateFunction · 0.50
useEffectFunction · 0.50
useInsertionEffectFunction · 0.50

Tested by

no test coverage detected