DEV Community

Discussion on: Toggling Light/Dark Theme in React with useContext

Collapse
 
pavanmehta profile image
Pavan Maheshwari

What if we create a simple hook which just toggles the mode for us. Ideally inside of an app we'd only be having the toggle button at one place. We might not need context provider for this.