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 @@ -10,6 +10,7 @@ export function TestServerActionBindReset() {
1010 action = { async ( ) => {
1111 'use server'
1212 testServerActionBindSimpleState = '[?]'
13+ testServerActionBindMemberState = '[?]'
1314 testServerActionBindActionState = '[?]'
1415 testServerActionBindClientState ++
1516 } }
@@ -94,3 +95,28 @@ export function TestServerActionBindAction() {
9495 </ form >
9596 )
9697}
98+
99+ let testServerActionBindMemberState = '[?]'
100+
101+ export function TestServerActionBindMember ( ) {
102+ const x = {
103+ y : {
104+ z : 1234 ,
105+ } ,
106+ invalid : ( ) => { } ,
107+ }
108+
109+ return (
110+ < form
111+ action = { async ( ) => {
112+ 'use server'
113+ testServerActionBindMemberState = JSON . stringify ( x . y . z === 1234 )
114+ } }
115+ >
116+ < button type = "submit" > test-server-action-bind-member</ button >
117+ < span data-testid = "test-server-action-bind-member" >
118+ { testServerActionBindMemberState }
119+ </ span >
120+ </ form >
121+ )
122+ }
Original file line number Diff line number Diff line change 66 TestServerActionBindClient ,
77 TestServerActionBindReset ,
88 TestServerActionBindSimple ,
9+ TestServerActionBindMember ,
910} from './action-bind/server'
1011import { TestServerActionError } from './action-error/server'
1112import {
@@ -105,6 +106,7 @@ export function Root(props: { url: URL }) {
105106 < TestServerActionBindSimple />
106107 < TestServerActionBindClient />
107108 < TestServerActionBindAction />
109+ < TestServerActionBindMember />
108110 < TestSerializationServer />
109111 < TestClientInServer />
110112 < TestServerInServer />
You can’t perform that action at this time.
0 commit comments