rsnext/test/integration/react-streaming/app/pages/404.js
Jiachi Liu 5e2ad29309
Migrate rsc tests to app dir tests (#38158)
### Tests 
* keep node & edge for streaming
* separate rsc tests from streaming tests
* move rsc tests to app-dir, disable the broken ones for now
2022-06-29 23:12:57 +00:00

24 lines
434 B
JavaScript

import { Suspense } from 'react'
let result
let promise
function Data() {
if (result) return result
if (!promise)
promise = new Promise((res) => {
setTimeout(() => {
result = 'next_streaming_data'
res()
}, 500)
})
throw promise
}
export default function Page404() {
return (
<Suspense fallback={null}>
<span id="text">custom-404-page</span>
<Data />
</Suspense>
)
}