DEV Community

loading...

Discussion on: The Perfect Dark Mode

Collapse
stativka profile image
Eugene Stativka

No DB involved. You parse cookies during SSR and add the data-theme attribute on the server. On the client you update cookies every time you change the setting.