How can I keep the previous page when a loader throws? #1821
Unanswered
ClementDreptin
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey,
I would like to keep the previous page when a
loader
throws during navigation.Let's say I have 2 routes:
/
and/about
. And/about
has a loader that might throw. I would like to stay on/
and display the error in some way, like a toast for example.I thought I could do this by providing an
onError
callback to my/about
route, but I need to provide anerrorComponent
if I don't want the default one to show, which will override the content of my/
route.What lead me to believe the navigation would be cancelled was the following phrase from the documentation.
Am I missing something or is this kind of behavior not supported right now?
Beta Was this translation helpful? Give feedback.
All reactions