Closed
Description
What version of React Router are you using?
6.4.0
Steps to Reproduce
I modified the Deferred example app: https://stackblitz.com/edit/github-roj5bp?file=src/routes.tsx
- Open sample above
- Open dev tools
- Click on Deferred 2
- Click on Home
- In dev tools, you should get a "Deferred data aborted" error even though the object passed to
defer
contains only a single resolved promise
Is this behavior expected? I can't find any info about it on the web.
Expected Behavior
The object passed to defer has just one resolved value:
export async function deferredLoader2() {
return defer({
critical1: await resolve("Critical 1", 250),
});
}
So I would expect that there should not be any errors around deferred data being aborted.
Actual Behavior
The error is thrown. One thing to note, is that if you click on the Deferred link (which is unmodified from the example app) and let it load, the error does not occur.