Skip to content

Commit e26fa0d

Browse files
unstubbablesebmarkbage
authored andcommitted
Add overlapping IO to Bar component in Flight fixture
``` -1..........-2.....------ ---3....................- ```
1 parent 3b3f5c3 commit e26fa0d

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

fixtures/flight/src/App.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,19 @@ async function delay(text, ms) {
3737
return new Promise(resolve => setTimeout(() => resolve(text), ms));
3838
}
3939

40+
async function delayTwice() {
41+
await delay('', 20);
42+
await delay('', 10);
43+
}
44+
45+
async function delayTrice() {
46+
const p = delayTwice();
47+
await delay('', 40);
48+
return p;
49+
}
50+
4051
async function Bar({children}) {
41-
await delay('deferred text', 10);
52+
await delayTrice();
4253
return <div>{children}</div>;
4354
}
4455

0 commit comments

Comments
 (0)