Skip to content

Conversation

jonathanhefner
Copy link
Contributor

@jonathanhefner jonathanhefner commented Apr 4, 2025

This test currently fails with the following error:

React Element cannot be passed to Server Functions from the Client without a temporary reference set. Pass a TemporaryReferenceSet to the options. {children: </>} ^^^


@dai-shi I tried to find the best place to add an e2e per #1350 (comment). Let me know if you prefer elsewhere.


(edit by @dai-shi) Added some commits and fixed it.

This test currently fails with the following error:

  > React Element cannot be passed to Server Functions from the Client without a temporary reference set. Pass a TemporaryReferenceSet to the options. {children: </>} ^^^
Copy link

vercel bot commented Apr 4, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
waku ✅ Ready (Inspect) Visit Preview Apr 6, 2025 0:50am
Copy link

codesandbox-ci bot commented Apr 4, 2025

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@dai-shi
Copy link
Member

dai-shi commented Apr 5, 2025

Cannot access constructor on the server. You cannot dot into a temporary client reference from a server component. You can only pass the value through to the client.

Hmm, somehow the temporary references don't work as expected on the server.

@dai-shi dai-shi changed the title Test React component as server function argument Apr 6, 2025
@dai-shi dai-shi marked this pull request as ready for review April 6, 2025 01:49
@dai-shi dai-shi mentioned this pull request Apr 6, 2025
@dai-shi dai-shi merged commit 03e6107 into wakujs:main Apr 6, 2025
21 checks passed
dai-shi added a commit that referenced this pull request Apr 22, 2025
#1354 fixed with only server functions. This is for server components.

- [x] add failing test
- [x] fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants