MCPcopy Index your code
hub / github.com/adobe/react-spectrum / AsyncComponent

Function AsyncComponent

packages/react-aria/stories/utils/useId.stories.tsx:23–35  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

21
22let count = 0;
23function AsyncComponent() {
24 if (count < 5) {
25 throw new Promise(resolve => {
26 return setTimeout(() => {
27 console.log('resolving', count, Date.now());
28 count++;
29 resolve(true);
30 }, 100);
31 });
32 }
33
34 return null;
35}
36
37function TestUseId(): JSX.Element {
38 let [show, setShow] = useState(true);

Callers

nothing calls this directly

Calls 1

resolveFunction · 0.50

Tested by

no test coverage detected