Not from the top of my head, but look for hooks and context.
The idea is to create a provider that will create the theme and hold the state with a method for toggling it. with that like redux, it can be called from any sub component.
For me looks like a cleaner way than setting up a redux store.
Do you have a link to an article describing this approach?
Not from the top of my head, but look for hooks and context.
The idea is to create a provider that will create the theme and hold the state with a method for toggling it. with that like redux, it can be called from any sub component.
For me looks like a cleaner way than setting up a redux store.
create your custom useTheme hook: youtu.be/5LrDIWkK_Bc
I'll check it out. Thanks.