there is a package called constate can help you simplify most of the context part
instead of putting the logic inside ThemeProvider wrapper
you can simply create a hook called useTheme and all component that use it will share the same hook instance
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.