-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hook to update theme #116
Comments
I don’t see why you need one. You can pass a new theme object to ThemeProvider and it will rerender.
… On 16. Oct 2021, at 15:04, Ilan Schemoul ***@***.***> wrote:
Would you consider adding an hook to update the theme ?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <#116>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAAM4WFVTF3Y7KTFYHDDTQDUHFS5JANCNFSM5GDSNKVQ>.
Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
But then I need to manually add my own provider to be able to update the state of the "theme" object of Theme provider from child components. Don't I ? |
I am guessing if you are able to change the theme, you also have logic to do so, meaning you already have a parent component that renders the ThemeProvider and it can use state to set the theme
… On 16. Oct 2021, at 21:49, Ilan Schemoul ***@***.***> wrote:
But then I need to manually add my own provider to be able to update the state of the "theme" object of Theme provider from child components. Don't I ?
I feel like it would be simpler to have a single provider. But maybe it's not a good idea ?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#116 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAAM4WFB3KWPUAJTMRSB2M3UHHCK7ANCNFSM5GDSNKVQ>.
Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Would you consider adding an hook to update the theme ?
The text was updated successfully, but these errors were encountered: