File tree Expand file tree Collapse file tree
packages/plugin-rsc/examples/basic/src/routes Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ export function clientDep ( ) {
2+ return '[ok]'
3+ }
Original file line number Diff line number Diff line change 1+ 'use client'
2+
3+ import React from 'react'
4+ import { clientDep } from './client-dep'
5+
6+ export function TestHmrClientDep2 ( ) {
7+ const [ count , setCount ] = React . useState ( 0 )
8+ return (
9+ < div data-testid = "test-hmr-client-dep2" >
10+ < button onClick = { ( ) => setCount ( ( c ) => c + 1 ) } >
11+ test-hmr-client-dep2: { count }
12+ </ button >
13+ { clientDep ( ) } < a href = "?test-hmr-client-dep2-re-render" > re-render</ a >
14+ </ div >
15+ )
16+ }
Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ import { TestHmrSwitchClient } from './hmr-switch/client'
4141import { TestTreeShakeServer } from './tree-shake/server'
4242import { TestClientChunkServer } from './chunk/server'
4343import { TestTailwind } from './tailwind'
44+ import { TestHmrClientDep2 } from './hmr-client-dep2/client'
4445
4546export function Root ( props : { url : URL } ) {
4647 return (
@@ -64,6 +65,7 @@ export function Root(props: { url: URL }) {
6465 < TestDepCssInServer />
6566 < TestHydrationMismatch url = { props . url } />
6667 < TestHmrClientDep />
68+ < TestHmrClientDep2 />
6769 < TestHmrSharedServer />
6870 < TestHmrSharedClient />
6971 < TestHmrSharedAtomic />
You can’t perform that action at this time.
0 commit comments