Skip to content

Conversation

@gnoff
Copy link
Collaborator

@gnoff gnoff commented Nov 8, 2024

This readme documents React Server Components from react-server package enough to get an implementer started. It's not comprehensive but it's a beginning point and crucially adds documentation for the prerender API for Flight.

@vercel
Copy link

vercel bot commented Nov 8, 2024

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

Name Status Preview Comments Updated (UTC)
react-compiler-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 9, 2024 0:04am

@react-sizebot
Copy link

react-sizebot commented Nov 8, 2024

The size diff is too large to display in a single comment. The GitHub action for this pull request contains an artifact called 'sizebot-message.md' with the full message.

Generated by 🚫 dangerJS against 21a343b


**Use it at your own risk.**

## Usage
Copy link
Member

Choose a reason for hiding this comment

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

It would be cool to include a Reference section with the exports for flight and fizz (even with just the types).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

added a partial reference.

This readme documents React Server Components from `react-server` package enough to get an implementor started. It's not comphrensive but it's a beginning point and crucially adds documentation for the `prerender` API for Fligth.
@gnoff gnoff merged commit ff595de into facebook:main Nov 9, 2024
184 checks passed
@gnoff gnoff deleted the document-flight branch November 9, 2024 00:07
### `stopFlowing(request: Request): void`
If you need to pause or permanently end the writing of any additional serialized output for this request you can call `stopFlowing(request)`. You may start flowing again after you've stopped. This is how you would implement backpressure support for streams for instance. It's important to note that stopping flowing is not going to stop rendering it simply causes the request to buffer any serialized chunks until they are requested again with `startFlowing()`.
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is an implementation detail though. E.g. Fizz doesn't just simply buffer serialized chunks. It's likely Flight also would become more lazy in that regard.

Copy link
Collaborator

Choose a reason for hiding this comment

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

E.g. it would be the wrong take away that it would be better for a consumer to just manage its own buffer.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed React Core Team Opened by a member of the React Core Team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants