router
router copied to clipboard
Cannot properly reset from `errorComponent` if the loader returns both async and deferred data
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
- Click the
resetbutton, nothing happens. - Click the
resetbutton again, it recovers from theerrorComponent, but the route seems to reload again when it is loaded. - Remove the
asyncDatarelated code and re-run the example app. - Click the
resetbutton, it recovers from theerrorComponentand 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