How to apply emotion
style to ErrorBoundary
#6543
Unanswered
Kazuhiro-Mimaki
asked this question in
Q&A
Replies: 1 comment 9 replies
-
You can use a layout route and put the ErrorBoundary there. That way the root will render the ErrorBoundary as Outlet. https://remix.run/docs/en/main/guides/routing#pathless-layout-routes example:
ErrorBoundary from root.tsx does not render the Root element. is the "ultimate" fallback (if root fails, you need something than is deterministic and do not depend from others. |
Beta Was this translation helpful? Give feedback.
9 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I use remix with emotion as style framework.
If I throw error in action function, remix redirect to ErrorBoundary(in root).
However, style is not applied in the error page.
Why emotion is not applied to redirected error page and how to?
Following code is example for
root.tsx
.If
throw new Error()
in loader/action function in routes, ErrorBoundary catch the error and display the body of ErrorBoundary, but emotion style is not applied.root.tsx
Beta Was this translation helpful? Give feedback.
All reactions