MCPcopy Index your code
hub / github.com/react/react / Async

Function Async

packages/react-reconciler/src/__tests__/ReactUse-test.js:96–105  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

94 it('if suspended fiber is pinged in a microtask, retry immediately without unwinding the stack', async () => {
95 let fulfilled = false;
96 function Async() {
97 if (fulfilled) {
98 return <Text text="Async" />;
99 }
100 Scheduler.log('Suspend!');
101 throw Promise.resolve().then(() => {
102 Scheduler.log('Resolve in microtask');
103 fulfilled = true;
104 });
105 }
106
107 function App() {
108 return (

Callers 1

ReactUse-test.jsFile · 0.70

Calls 2

thenMethod · 0.65
useFunction · 0.50

Tested by

no test coverage detected