Submitted about 2 years agoA solution to the Todo app challenge
Todo app built with Html, css and vanilla js
tailwind-css
@rohitKumar38344

Solution retrospective
I have used the approach of changing src value to switch between light and dark mode. Is there any better way to do this?
if (darkMode == "enabled") {
enableDarkMode();
// img.src = "images/icon-moon.svg";
document.getElementById("theme-changer").src = "images/icon-moon.svg";
}
Code
Loading...
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on Rohit Kumar's solution.
Join our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord