Closed hmajid2301 closed 4 years ago
This could be related to #132 both are loading in values dynamically.
Hi @hmajid2301
I tried to replicate the issue here: https://codesandbox.io/s/friendly-poitras-egoj5?file=/src/App.js but everything seems ok
Probably this sample is missing something, are you able to replicate the issue there?
I already took the ThemeContext
from your repository
Hmm thanks for that, it looks to be related to gatsby
after updating my gatsby-browser.js
to this seems to have fixed the issue.
export const wrapRootElement = ({ element }) => (
<ThemeContextProvider>
<div className="root overflow-hidden">{element}</div>
</ThemeContextProvider>
);
Whenever I try to set the particle colour dynamically using a React context I get the following Error in Chrome (not in firefox, in firefox it works fine). I'm using version
3.3.0
of this library.Where the component im using looks something like this: Note
theme
will either belight
ordark
.If I change
to
Everything works as expected. Any help would be appreciated thanks.