Replies: 1 comment 3 replies
-
If your parent loader had an error, it would render the ErrorBoundary and not your child component. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a parent component and a child component, each with their own loaders. The child component requires data from the parent component, so I use useRouteLoaderData pointing to the parent. This parent loader is loading some data that is not critical to the child component. What is the correct Remix paradigm to handle errors in the parent loader, while being called from the child component? If this was a regular API endpoint, I would just check if the fetch was successful and handle it appropriately, but with the useRouteLoaderData, I'm not sure how I am supposed to detect and handle this error in the child component.
Beta Was this translation helpful? Give feedback.
All reactions