You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While hacking into react-with-styles in order to integrate react-dates in an application that use a different style architecture (gist), I realized that both the Theme and the Interface are singletons.
So if I understand well, it is not possible to have two customizations (use two different themes) for the same component in different places of the application.
Am I missing something? Wouldn't it be better to rely on React's Context (or another alternative)? What are the recommendations?
I'm asking by curiosity, I don't have an actual use case.
The text was updated successfully, but these errors were encountered:
I think the original hope/plan/thought was that you wouldnt ever want the same component to look inconsistent on the page when compared to another instance of itself.
Certainly if it was render-tree specific, it’d have to rely on React context.
While hacking into
react-with-styles
in order to integratereact-dates
in an application that use a different style architecture (gist), I realized that both the Theme and the Interface are singletons.So if I understand well, it is not possible to have two customizations (use two different themes) for the same component in different places of the application.
Am I missing something? Wouldn't it be better to rely on React's Context (or another alternative)? What are the recommendations?
I'm asking by curiosity, I don't have an actual use case.
The text was updated successfully, but these errors were encountered: