Closed ryanbaer closed 5 years ago
Please create a reproducible example on codesandbox.
@ryanbaer did you figure out the problem? I am currently struggling with the same issue :-)
@janhartmann can you maybe create a reproducible example on codesandbox and maybe check if the same issue exists in v2? Because we don't use state anymore.
No issues in v2.
Will close this as it is fixed in v2 and higher.
My app allows an admin to switch between different users. Each user has a different theme, which is applied when the admin switches. It does so via a component I made, WhitelabelProvider, which is nested inside of React Router's BrowserRouter component.
My WhitelabelProvider contains your library's Theme Provider, and renders it like so:
The remainder of the routes and components are rendered via the children prop.
I'm finding that, when changing themes, certain components, all of which use
withTheme
, are displaying warnings like so:Am I somehow using ThemeProvider or WithTheme incorrectly? Any help is appreciated, and I'm happy to provide more context if needed.
Some relevant package.json entries: