DEV Community

Discussion on: Dark Mode - Unmistified! 🐱‍👤

Collapse
 
akhilarjun profile image
Akhil Arjun

Since it is a native js plugin. I don't think it should in any way interfere with the React application lifecycle. Include theme.js in your index.html and make sure to call the switchTheme() method from your component's onClick handle.
I am not a React expert, but I am sure this should work. Let me know if it doesn't I will give it a try myself ✌