What is the difference between errorElement and ErrorBoundary? #11456
Replies: 2 comments 2 replies
-
As for when to choose, it really depends on how you reference your components. The nice thing about elements, is that you can pass in props that React Router doesn't know about, including children. This is essentially the same as |
Beta Was this translation helpful? Give feedback.
-
@kiliman
Why is it important for React Router to know children of element? Is there any optimization logic or something? |
Beta Was this translation helpful? Give feedback.
-
I'm trying to understand what is the difference between
errorElement
andErrorBoundary
props on a route definition.The official docs does not help much.
When should I choose
errorElement
and whenErrorBoundary
?Thank you
Beta Was this translation helpful? Give feedback.
All reactions