---
title: "Discussion on \"Light/Dark Mode toggle in React JS using Context API\" | Hashnode"
description: "Discussion on \"Light/Dark Mode toggle in React JS using Context API\". Hello Dev, Now a days most of the websites have dark and light mode. In this post we will learn how to do that in your React application using the Context API.\nPackages:\nreact-switch To implement the toggle switch (you can use button also)\nreact-icon..."
url: "https://hashnode.com/posts/light-dark-mode-toggle-in-react-js-using-context-api/5f94826cfbdce372c9a57337"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Light/Dark Mode toggle in React JS using Context API](https://gayathri.hashnode.dev/light-dark-mode-toggle-in-react-js-using-context-api?utm_source=hashnode&utm_medium=feed)

Hello Dev, Now a days most of the websites have dark and light mode. In this post we will learn how to do that in your React application using the Context API. Packages: react-switch To implement the toggle switch (you can use button also) react-icon...

Oct 24, 2020 · 4 min read · gayathri.hashnode.dev  
Updated Apr 30, 2024  
Read the article

-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#theme](https://hashnode.com/tag/theme)

## Written by

[Gayathri Perumal](https://hashnode.com/@gayathrithedev)

@gayathrithedev · Bangalore, India

  
[View profile](https://hashnode.com/@gayathrithedev)

Building Softwares that helps the society!

I am a self taught dev with a computer science degree. I have 4+ years of experience in working with React Native and Front end. At Hashnode to share my knowledge.

## Responses 2

Markdown supported · ⌘↵ to post

[Joshua Oyewole](https://hashnode.com/@joshuaOyewole)

[Oct 27, 2020](https://hashnode.com/posts/light-dark-mode-toggle-in-react-js-using-context-api/5f94826cfbdce372c9a57337/comment/5f9813e46ea7602886a1634b)

Kind of lost. I will try it again and see

[Mirudhubashini](https://hashnode.com/@Mb55)

[Oct 25, 2020](https://hashnode.com/posts/light-dark-mode-toggle-in-react-js-using-context-api/5f94826cfbdce372c9a57337/comment/5f958816fbdce372c9a57bb1)

Easy to understand 👏
