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'
4444import { TestHmrClientDep2 } from './hmr-client-dep2/client'
4545import { TestHmrClientDep3 } from './hmr-client-dep3/server'
4646import { TestChunk2 } from './chunk2/server'
47+ import { TestUseId } from './use-id/server'
4748
4849export function Root ( props : { url : URL } ) {
4950 return (
@@ -101,6 +102,7 @@ export function Root(props: { url: URL }) {
101102 < TestTreeShakeServer />
102103 < TestClientChunkServer />
103104 < TestChunk2 />
105+ < TestUseId />
104106 </ body >
105107 </ html >
106108 )
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