Redirecting with Pending Component
We recently added logic to add a default pending component.
Our route has a loader and on certain status codes, we throw a redirect to a different page. However, after we added the above to, whenever we throw a redirect the route match remains in "pending" with isFetching = true and pending = true (shown in TanStack dev tools).
Before we added the pending, it redirected as expected, however, now it doesn't seem to behave as expected. When we have a regular Error thrown (i.e throw Error()), it renders the errorComponent as expected and the route match status goes to "failed" and isFetching is false.
Does anyone have an idea why throwing the redirect doesn't work as expected?
1 Reply
passive-yellow•15mo ago
Did you solve this?