File tree Expand file tree Collapse file tree 3 files changed +27
-0
lines changed
packages/plugin-rsc/examples/basic/src/routes Expand file tree Collapse file tree 3 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ import { TestTailwind } from './tailwind'
44
44
import { TestHmrClientDep2 } from './hmr-client-dep2/client'
45
45
import { TestHmrClientDep3 } from './hmr-client-dep3/server'
46
46
import { TestChunk2 } from './chunk2/server'
47
+ import { TestUseId } from './use-id/server'
47
48
48
49
export function Root ( props : { url : URL } ) {
49
50
return (
@@ -101,6 +102,7 @@ export function Root(props: { url: URL }) {
101
102
< TestTreeShakeServer />
102
103
< TestClientChunkServer />
103
104
< TestChunk2 />
105
+ < TestUseId />
104
106
</ body >
105
107
</ html >
106
108
)
Original file line number Diff line number Diff line change
1
+ 'use client'
2
+
3
+ import { useId } from 'react'
4
+
5
+ export function TestUseIdClient ( ) {
6
+ const id = useId ( )
7
+ return < > test-useId-client: { id } </ >
8
+ }
Original file line number Diff line number Diff line change
1
+ import { useId } from 'react'
2
+ import { TestUseIdClient } from './client'
3
+
4
+ export function TestUseId ( ) {
5
+ return (
6
+ < div data-testid = "use-id" >
7
+ < TestUseIdServer />
8
+ |
9
+ < TestUseIdClient />
10
+ </ div >
11
+ )
12
+ }
13
+
14
+ function TestUseIdServer ( ) {
15
+ const id = useId ( )
16
+ return < > test-useId-server: { id } </ >
17
+ }
You can’t perform that action at this time.
0 commit comments