DEV Community

loading...

Discussion on: The Perfect Dark Mode

Collapse
lookrain profile image
Lu Yu

Cookies seems to be an elegant way of tackling this problem to me. You can parse the cookies during SSR to generate the correct theme. As long as the cookie is not http-only, client side should also have access to that cookie, also able to change it.