-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Deferred values seem broken in single fetch #10467
Comments
You have to throw an error. In this example a string is thrown, not an error |
@brookslybrand I also tried a Response, and that doesn't work either |
@brookslybrand the docs also say |
here's a similar repro of this working without single fetch: https://stackblitz.com/edit/remix-run-remix-msywtrm6?file=app%2Froutes%2F_index.tsx,vite.config.ts (just turn on single fetch to see it behave inconsistently) 1 caveat which personally makes this API a little rough to use is not being able to have it already consume error responses or primitive values |
This seems to be a duplicate issue of I'm not sure whether it was intended or not to throw arbitrary non-error values from deferred promises before single fetch. As for sending a Response, I don't know if that's a great value to return, since the response for the data/document has already been sent. This is further data that's streaming in |
Reproduction
https://stackblitz.com/edit/remix-run-remix-obxpgddh?file=app%2Froutes%2F_index.tsx
System Info
Used Package Manager
npm
Expected Behavior
expect to be able to use the value from useAsyncError
Actual Behavior
never consistently returns the error value.
The text was updated successfully, but these errors were encountered: