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

Function Suspend

fixtures/view-transition/src/components/Page.js:67–70  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

65
66let wait;
67function Suspend() {
68 if (!wait) wait = sleep(500);
69 return React.use(wait);
70}
71
72export default function Page({url, navigate}) {
73 const [renderedUrl, optimisticNavigate] = useOptimistic(

Callers

nothing calls this directly

Calls 1

sleepFunction · 0.70

Tested by

no test coverage detected