Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: server functions return RSC payload #93

Merged
merged 1 commit into from
Dec 8, 2024

Conversation

lazarv
Copy link
Owner

@lazarv lazarv commented Dec 8, 2024

Server functions now return result in RSC payload. This helps with supporting multiple types of results (including binary formats) and also enables the new reload() API which enables single-roundtrip mutation and page (or outlet) refresh by combining the server function result with the rendered component in a single RSC payload.

Includes tests for multiple server function result types and documentation update to include reload().

This PR addresses an issue with server functions without a return value (Promise<void>) and enhances the framework to be able to return a rendered component along with the server function return value discussed in #85.

Copy link

github-actions bot commented Dec 8, 2024

✅ Documentation preview deployed to: https://react-server-docs-704dldlrp-lazarv-team.vercel.app

@lazarv lazarv merged commit a70e816 into main Dec 8, 2024
8 checks passed
@lazarv lazarv deleted the feat/server-functions-rsc-payload branch December 8, 2024 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant