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

Function Content

fixtures/flight-parcel/src/client.tsx:25–35  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

23 | null = null;
24
25function Content() {
26 // Store the current root element in state, along with a callback
27 // to call once rendering is complete.
28 let [[root, cb], setRoot] = useState<[ReactElement, (() => void) | null]>([
29 use(initialRSCPayload),
30 null,
31 ]);
32 updateRoot = (root, cb) => setRoot([root, cb ?? null]);
33 useInsertionEffect(() => cb?.());
34 return root;
35}
36
37// Hydrate initial page content.
38startTransition(() => {

Callers

nothing calls this directly

Calls 4

useStateFunction · 0.90
useFunction · 0.90
useInsertionEffectFunction · 0.90
cbFunction · 0.50

Tested by

no test coverage detected