File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
packages/plugin-rsc/examples/starter/src Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -11,3 +11,11 @@ export function ClientCounter() {
1111 </ button >
1212 )
1313}
14+
15+ const promise = Promise . resolve ( 'ok' )
16+
17+ export function TestClientUse ( ) {
18+ const value = React . use ( promise )
19+ console . log ( value )
20+ return < span > TestClientUse: { value } </ span >
21+ }
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import './index.css' // css import is automatically injected in exported server
22import viteLogo from '/vite.svg'
33import { getServerCounter , updateServerCounter } from './action.tsx'
44import reactLogo from './assets/react.svg'
5- import { ClientCounter } from './client.tsx'
5+ import { ClientCounter , TestClientUse } from './client.tsx'
66
77export function Root ( ) {
88 return (
@@ -14,7 +14,8 @@ export function Root() {
1414 < title > Vite + RSC</ title >
1515 </ head >
1616 < body >
17- < App />
17+ < TestClientUse />
18+ { /* <App /> */ }
1819 </ body >
1920 </ html >
2021 )
You can’t perform that action at this time.
0 commit comments