I am creating a page which will have both light mode and dark mode. I have added both the buttons, and have created two different CSS spreadsheets, one for dark mode and one for light mode. I am currently using the light mode CSS file as I imported it at the beginning, however I am unsure how to select a different CSS file to be used. If anyone knows a solution I'd really appreciate some help.
Asked
Active
Viewed 64 times
1
-
https://stackoverflow.com/questions/28386125/dynamically-load-a-stylesheet-with-react – MyTwoCents May 22 '21 at 12:27
-
You can try this alternative: [How to achieve dark/light themes in a React App?](https://stackoverflow.com/a/66829464/2873538) – Ajeet Shah May 22 '21 at 16:16