MCPcopy
hub / github.com/preactjs/preact / Container

Function Container

compat/test/browser/suspense-list.test.jsx:551–569  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

549 /** @type {(v) => void} */
550 let showB;
551 function Container() {
552 const [showHidden, setShowHidden] = useState(false);
553 showB = setShowHidden;
554 return (
555 <SuspenseList revealOrder="together">
556 <Suspense fallback={<span>Loading...</span>}>
557 <div />
558 </Suspense>
559 {showHidden && (
560 <Suspense fallback={<span>Loading...</span>}>
561 <ComponentB />
562 </Suspense>
563 )}
564 <Suspense fallback={<span>Loading...</span>}>
565 <ComponentA />
566 </Suspense>
567 </SuspenseList>
568 );
569 }
570 render(<Container />, scratch); // Render initial state
571
572 rerender();

Callers

nothing calls this directly

Calls 1

useStateFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…