A simple React project that implements dark mode using TailwindCSS and Context API to pass and toggle theme with persistence capability.
Live demo.
This project is part of a dedicated detailed blog post.
Helpful scripts:
-
Run
npm run startto start project.Then open http://localhost:3000 to view in browser.
-
Run
npm run testto start tests. -
Run
npm run buildto build production bundle.