-
Notifications
You must be signed in to change notification settings - Fork 50k
[Flight] Add initial readme to react-server package #31464
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
|
||
| **Use it at your own risk.** | ||
|
|
||
| ## Usage |
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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.
edc8b8f to
21a343b
Compare
| ### `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()`. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This readme documents React Server Components from
react-serverpackage enough to get an implementer started. It's not comprehensive but it's a beginning point and crucially adds documentation for theprerenderAPI for Flight.