Skip to content
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

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

Open
Zebeqo opened this issue Sep 9, 2024 · 0 comments

Comments

@Zebeqo
Copy link

Zebeqo commented Sep 9, 2024

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 Zebeqo changed the title Cannot properly reset from errorComponent if the loader returns both async and deferred data. Cannot properly reset from errorComponent if the loader returns both async and deferred data Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant