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

refactor(react-server): use official encodeReply/decodeReply/decodeAction/decodeFormState + feat: support useActionState #282

Merged
merged 33 commits into from
Apr 20, 2024

Conversation

hi-ogawa
Copy link
Owner

@hi-ogawa hi-ogawa commented Apr 11, 2024

It looks like encode/decodeReply is not for progressive enhancement and they seem to have a quite different code path from stream case.


Well, I'm still not sure why encodeReply/decodeReply is necessary when defaultEncodeFormAction/decodeAction seems to do the same (but maybe only for FormData?).


TODO

@hi-ogawa hi-ogawa marked this pull request as ready for review April 11, 2024 02:33
@hi-ogawa hi-ogawa changed the title refactor(react-server): use encodeReply/decodeReply refactor(react-server): use official encodeReply/decodeReply Apr 11, 2024
@hi-ogawa hi-ogawa changed the title refactor(react-server): use official encodeReply/decodeReply refactor(react-server): use official encodeReply/decodeReply/decodeAction Apr 12, 2024
@hi-ogawa hi-ogawa marked this pull request as draft April 13, 2024 02:59
@hi-ogawa hi-ogawa changed the title refactor(react-server): use official encodeReply/decodeReply/decodeAction refactor(react-server): use official encodeReply/decodeReply/decodeAction/decodeFormState Apr 19, 2024
@hi-ogawa hi-ogawa changed the title refactor(react-server): use official encodeReply/decodeReply/decodeAction/decodeFormState refactor(react-server): use official encodeReply/decodeReply Apr 19, 2024
@hi-ogawa hi-ogawa changed the title refactor(react-server): use official encodeReply/decodeReply refactor(react-server): use official encodeReply/decodeReply/decodeAction/decodeFormState Apr 19, 2024
@hi-ogawa hi-ogawa changed the title refactor(react-server): use official encodeReply/decodeReply/decodeAction/decodeFormState refactor(react-server): use official encodeReply/decodeReply/decodeAction/decodeFormState + feat: support useActionState Apr 19, 2024
@hi-ogawa hi-ogawa marked this pull request as ready for review April 19, 2024 13:43
Comment on lines 67 to 69
// TODO: needs to await for hydration formState?
const initialLayout =
await reactServerDomClient.createFromReadableStream<ServerRouterData>(
Copy link
Owner Author

@hi-ogawa hi-ogawa Apr 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: move out action form state from initial ssr stream?

@hi-ogawa hi-ogawa merged commit eabfecb into main Apr 20, 2024
4 checks passed
@hi-ogawa hi-ogawa deleted the refactor-use-encodeReply-decodeReply branch April 20, 2024 03:26
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