Files
Jiachi LiuandGitHub 41a2eb2303 Clean up legacy react 18 tests (#35615)
### source changes
* Error dynamic suspense option in non concurrent mode, don't check react root anymore since they should be bound

### tests changes

* Remove duplicated rsc client test
* Merge type checking cases (`next/dynamic`)
* Remove blocking rendering tests cases since we should opt-in Fizz rendering when using React.lazy
* Remove some thrown promises cases, leverage the streaming component we had in RSC test
2022-03-28 12:32:34 +00:00

33 lines
551 B
TypeScript

// use tsx to cover typescript usage of next/dynamic + suspense: true
import React from 'react'
import dynamic from 'next/dynamic'
const Red = dynamic(() => import('../../components/red'), {
suspense: true,
})
function Blue() {
return (
<div>
<p>This is Blue.</p>
<style jsx>{`
p {
color: blue;
}
`}</style>
</div>
)
}
export default function StyledJsx() {
return (
<>
<Blue />
<React.Suspense fallback="Loading...">
<Red />
</React.Suspense>
</>
)
}