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

Router is stuck in displaying the loading component when an error is thrown from beforeLoad #2198

Open
cristi-lng opened this issue Aug 27, 2024 · 0 comments

Comments

@cristi-lng
Copy link
Contributor

Describe the bug

When an error is thrown from the beforeLoad option of a route and the router is configured with pending component, it seems that the router remains stuck in displaying the pending component.

If I remove the pending component it doesn't display anything.

Your Example Website or App

https://stackblitz.com/edit/tanstack-router-g8hajv?file=src%2Fmain.tsx

Steps to Reproduce the Bug or Issue

  1. Check the demo from the link
  2. See how the pending component is displayed indefinitely
  3. You can toggle the defaultPendingComponent to test without the pending mode

Expected behavior

I was expecting to see the error component in both cases: with and without the pending component.

Screenshots or Videos

No response

Platform

  • OS: macOS
  • Browser: Chrome
  • @tanstack/react-router: 1.51.0

Additional context

No response

@TanStack TanStack deleted a comment Aug 27, 2024
schiller-manuel added a commit that referenced this issue Aug 27, 2024
schiller-manuel added a commit that referenced this issue Aug 27, 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