Skip to content

A ReactJS-based switch to change style of page from Light to Dark or vice versa.

License

Notifications You must be signed in to change notification settings

BaseMax/react-theme-switcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-theme-switcher

A React JS-based switch to change style of page from Light to Dark or vice versa.

Watch Demo

Features

  • CSS Animation
  • React JS
  • React Context
  • React State Management
  • Host ReactJS App via GitHub Pages

Install dependency

npm install

Start and serve service

npm start

Build project

npm run-script build

Move build directory to gh-pages branch and commit:

cp build/ /tmp/
git checkout gh-pages
rm -rf *
mv /tmp/build/* .
git status
git add .
git commit -m "Upload build directory to gh-pages branch
git push

Credit

This question was a company question in a contest. I only join to solve this problem to challenge myself.

A good introduction for working with React Contexts:


Max Base

My nickname is Max, Programming language developer, Full-stack programmer. I love computer scientists, researchers, and compilers. (Max Base)

Asrez Team

A team includes some programmer, developer, designer, researcher(s) especially Max Base.

Asrez Team

Releases

No releases published

Packages

No packages published