mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
### 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
22 lines
433 B
TypeScript
22 lines
433 B
TypeScript
import React, { Suspense } from 'react'
|
|
import { createStreamingData } from '../../test/streaming-data'
|
|
|
|
const Data = createStreamingData()
|
|
|
|
export default function Styled() {
|
|
return (
|
|
<Suspense fallback={`fallback`}>
|
|
<Data>
|
|
<div>
|
|
<p>This is Red.</p>
|
|
<style jsx>{`
|
|
p {
|
|
color: red;
|
|
}
|
|
`}</style>
|
|
</div>
|
|
</Data>
|
|
</Suspense>
|
|
)
|
|
}
|