mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
### Tests * keep node & edge for streaming * separate rsc tests from streaming tests * move rsc tests to app-dir, disable the broken ones for now
25 lines
398 B
JavaScript
25 lines
398 B
JavaScript
import { Suspense } from 'react'
|
|
|
|
let did = false
|
|
function MyError() {
|
|
if (!did && typeof window === 'undefined') {
|
|
did = true
|
|
throw new Error('oops')
|
|
}
|
|
}
|
|
|
|
export default function page() {
|
|
return (
|
|
<>
|
|
<h1>Hey Error</h1>
|
|
<Suspense fallback="error-fallback">
|
|
<MyError />
|
|
</Suspense>
|
|
</>
|
|
)
|
|
}
|
|
|
|
export const config = {
|
|
runtime: 'experimental-edge',
|
|
}
|