forked from vercel/next.js
/
page.js
31 lines (29 loc) · 917 Bytes
/
page.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import ClientFromDirect from '../../components/client'
import ClientFromShared from '../../components/shared'
import SharedFromClient from '../../components/shared-client'
import Random from '../../components/random-module-instance'
import Bar from '../../components/bar'
export default function Page() {
// All three client components should be rendered correctly, but only
// shared component is a server component, and another is a client component.
// These two shared components should be created as two module instances.
// It's expected to have hydration mismatch here.
return (
<div id="main" suppressHydrationWarning>
<Random />
<br />
<br />
<ClientFromDirect />
<br />
<ClientFromShared />
<br />
<ClientFromShared />
<br />
<SharedFromClient />
<br />
<SharedFromClient />
<br />
<Bar />
</div>
)
}