Thanks to visit codestin.com
Credit goes to github.com

Skip to content

musatirgithub/dark-mode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

84 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Table of contents

The challenge

Project focuses on showing the page in both dark and light theme.

Problem Statement

  • Develop an app which receives user preference about dark or light theme. In accordance with user's choice switch between dark & light theme.

Screenshot

gif

Project Information

  • Dark-mode app is made by using React,
  • Theme information is stored in local storage then assigned to a state variable,
  • With the help of useEffect, everytime user changes the state variable component re-renders, theme changes and local storage is updated.

I used;

  • React
  • DOM manipulation,
  • Local storage, useState, useEffect hooks.

Lesson Learned

  • document.documentElement.className DOM element is quite useful for assigning global styles.

Useful resources

⌛ Happy Coding ✍

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published