Files
6dbf9c32ec Handle dynamic css-in-js styles under suspense (#42293)
We insert the content returning from `useServerInsertedHTML` to head
element for app dir, but it shouldn't only inject once since there're
suspense boundaries that could hold insertions.

## Bug

- [ ] Related issues linked using `fixes #number`
- [x] Integration tests added
- [ ] Errors have a helpful link attached, see `contributing.md`

Co-authored-by: JJ Kasper <[email protected]>
2022-11-02 14:18:08 +01:00

23 lines
443 B
JavaScript

import { Suspense } from 'react'
import { createDataFetcher } from '../../lib/data'
import Nav from '../../components/nav'
const Data = createDataFetcher('next_streaming_data', {
timeout: 500,
})
export default function Page() {
return (
<div>
<div id="content">
<Suspense fallback="next_streaming_fallback">
<Data />
</Suspense>
</div>
<div>
<Nav />
</div>
</div>
)
}