re: Create a React hook to add dark theme to your app VIEW POST


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

code of conduct - report abuse