-
Notifications
You must be signed in to change notification settings - Fork 47.2k
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
[Flight] Add Client Infrastructure #17234
Conversation
Size changes (stable)ReactDOM: size: 🔺+4.8%, gzip: -10.4% Details of bundled changes.Comparing: bdcdb69...141bb4d react-dom
react-noop-renderer
react-flight
|
Size changes (experimental)Details of bundled changes.Comparing: bdcdb69...141bb4d react-dom
react-noop-renderer
react-flight
|
We don't want unit tests but instead test how both server and clients work together. So this merges server/client test files.
60157da
to
182f6ea
Compare
I'll probably end up deleting these deps later but they're here for now.
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.
I'm not deep on the streams part but this makes sense to me
complete(response); | ||
} | ||
function error(e: ProgressEvent): void { | ||
reportGlobalError(response, new TypeError('Network error')); |
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.
Why TypeError?
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.
Should there be any protection around this being called more than once? E.g. if some failure events fire in a succession.
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 supposed to mirror the type of fetch
rejecting. Not sure what type that is.
There will be protection against multiple in the internals once we actually have an implementation.
This adds some infra to the client build so that we can parse a stream into an object that can suspend.
See the fixture for example.