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: streaming serializer #275

Merged
merged 4 commits into from
Sep 18, 2023
Merged

feat: streaming serializer #275

merged 4 commits into from
Sep 18, 2023

Conversation

lxsmnsyc
Copy link
Collaborator

@lxsmnsyc lxsmnsyc commented Sep 18, 2023

This is a work-in-progress. This PR integrates seroval's new streaming serializer to be utilized by SolidJS as a whole. With the new serializer, SolidJS will be able to:

  • Dedupe references in both nested objects and across resources
  • Allows SolidJS to serialize Promise and ReadableStream instances
  • Allow nested Promise instances to be naturally deferred (only top-level Promise instances can be blocked). These instances are then serialized and streamed later on.
  • Part of the HydrationScript would be delegated to seroval as seroval has its own "hydration" script.

@lxsmnsyc lxsmnsyc marked this pull request as draft September 18, 2023 03:24
@ryansolid ryansolid changed the base branch from main to next September 18, 2023 21:59
@ryansolid
Copy link
Owner

Hey @lxsmnsyc lets just give you repo access and I'm going to merge this into next so we can build this out together.

@ryansolid ryansolid marked this pull request as ready for review September 18, 2023 21:59
@ryansolid ryansolid merged commit 187ad37 into ryansolid:next Sep 18, 2023
2 checks passed
@lxsmnsyc lxsmnsyc deleted the seroval-next branch September 19, 2023 03:07
ryansolid pushed a commit that referenced this pull request Oct 4, 2023
* Update dependencies

* Add new serializer

* Rework serialization for `renderToString`

* Add serializer to stream
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.

2 participants