Repository navigation
Hook to update theme #116
Copy link
Copy link
Open
Description
Activity
- 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 feel like it would be simpler to have a single provider. But maybe it's not a good idea ?- 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>.
Metadata
Metadata
Assignees
Labels
No labels
Would you consider adding an hook to update the theme ?