Can I control the order of plugin wrapRootElement? #32196
Unanswered
aaronadamsCA
asked this question in
Help
Replies: 2 comments
-
Note: I know I can just load |
Beta Was this translation helpful? Give feedback.
0 replies
-
There's no granular control over ordering, however the order of plugins in your Of course, you could run into issues if, for another API, you required another reorder. |
Beta Was this translation helpful? Give feedback.
0 replies
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.
-
Scenario:
ErrorBoundary
component.ThemeProvider
component.ErrorBoundary
to have access toThemeProvider
context, so I can use theming inErrorBoundary.fallback
.I'm currently using
gatsby-plugin-theme-ui
, which useswrapRootElement
to add itsThemeProvider
. As far as I can tell, this always occurs before my ownwrapRootElement
call, meaning myErrorBoundary
cannot accessThemeProvider
's context, since it's inside theErrorBoundary
.This has also made me realize the potential for larger risks when it comes to the order in which
wrapRootElement
is executed.I can't seem to find any docs; is the order defined, and is it something I can control?
Beta Was this translation helpful? Give feedback.
All reactions