cssinjs / theming

Unified CSSinJS theming solution for React
300 stars 39 forks source link

Theme nesting above 2 #25

Closed oliviertassinari closed 6 years ago

oliviertassinari commented 6 years ago

This issue is part of a series of feedbacks. I been upgrading the Material-UI solution. Unfortunately, I had to fork the package in order to reach my goal. Now, it's time to reconciliation.

The issue

I found that the theme is no longer correctly propagated when we nest more than 2 ThemeProvider. It can be seen in the implementation of create-theme-provider.js. setState() is never called on the child broadcast after receiving a parent theme update.