router icon indicating copy to clipboard operation
router copied to clipboard

Cannot properly reset from `errorComponent` if the loader returns both async and deferred data

Open Zebeqo opened this issue 1 year ago • 0 comments

Which project does this relate to?

Router

Describe the bug

There are some weird behaviors when resetting from the errorComponent if the loader returns both async and deferred data. However, if the loader returns only async data or deferred data, everything is OK.

Your Example Website or App

https://stackblitz.com/edit/github-oc1rey?file=src%2Froutes%2Findex.tsx

Steps to Reproduce the Bug or Issue

  1. Click the reset button, nothing happens.
  2. Click the reset button again, it recovers from the errorComponent, but the route seems to reload again when it is loaded.
  3. Remove the asyncData related code and re-run the example app.
  4. Click the reset button, it recovers from the errorComponent and everything works fine.

Expected behavior

The first time you click the reset button, it will reset the errorComponent.

Screenshots or Videos

No response

Platform

  • OS: [macOS]
  • Browser: [Chrome]
  • Version: [128.0]

Additional context

No response

Zebeqo avatar Sep 09 '24 17:09 Zebeqo