Open gforro opened 2 weeks ago
I believe these are duplicates of this issue in RR which has been fixed and will be available in an upcoming release: https://github.com/remix-run/react-router/issues/12049
Thanks @brophdawg11 for the reaction. It might be the same (I was not able to find that issue event I have tried to find a similar issue). The issue mentioned no runtime error, but there is one - the sticked "loading" state of fetchers after the failed invariant. Also fetchers stops to be revalidated after that error.
@brophdawg11 any alternative fixes, until upcoming release ?
@gforro Remix 2.13.0-pre.0
is out - would you like to test your scenarios against that and let us know if that helps?
I have expected to not block navigation when a fetcher in the parent route is revalidated because of a form submission in a child route.
I think this expectation is incorrect - when a submission navigation occurs, it waits for all active loaders to be revalidated before proceeding - this includes all route loaders and all fetcher.load
calls.
With that in mind, would you be able to create individual minimal repros of any remaining issues on 2.13.0-pre.0
? I'd be happy to take a look but the conglomerate app showing off 4 different scenarios is a little confusing when trying to hone in on a singular issue.
Reproduction
https://stackblitz.com/~/github.com/gforro/remix-fetchers
Use cases which are probably bugs:
A: Fetcher in parent route gets to a for ever "loading" state
B: Fetcher in parent route gets to a for ever "loading" state
Another use cases, which seems to be strange:
C: Fetcher in parent route blocks navigation after Form submission
D: Fetcher in parent route blocks navigation after fetcher Form submission
Interesting that the application in case D behaves differently like in case A - they are similar and difference is the present of a fetcher in the child route. If there is a fetcher in the child route where the Fetcher form submission happened, then the navigation to Page 2 is blocked for a longer time (there is more successful revalidations of the Header fetcher but at use case ends with the very same invariant failure - just later.
System Info
Used Package Manager
npm
Expected Behavior
I have expected to not block navigation when a fetcher in the parent route is revalidated because of a form submission in a child route. I have also not expected to get invariant failures when playing with fetchers and to not get a "for ever" loading state for a fetcher.
Actual Behavior
Navigation is blocked if there is a fetcher in the parent route which is revalidated because of a form submission in the child route. This problem is noticeable when there are longer response times (I know that response time should be around 200ms but it i not always the case unfortunately)