| 1 | export default async function FileReader() { |
| 2 | // This debug string is below the threshold for debug string length, so its |
| 3 | // value is sent to the client as the awaited value. |
| 4 | await new Promise(resolve => { |
| 5 | setTimeout(() => resolve('o'.repeat(1000000)), 1); |
| 6 | }); |
| 7 | |
| 8 | // This debug string is above the threshold for debug string length, so the |
| 9 | // client receives a placeholder as the awaited value instead of the actual |
| 10 | // string. |
| 11 | await new Promise(resolve => { |
| 12 | setTimeout(() => resolve('x'.repeat(1000001)), 1); |
| 13 | }); |
| 14 | |
| 15 | return <p>FileReader</p>; |
| 16 | } |