I really didn't want to resort to cookies š¬
and to persist this setting on SSR would mean needing to keep a DB I think? I'm open to other suggestions if you've got any!
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.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I really didn't want to resort to cookies š¬
and to persist this setting on SSR would mean needing to keep a DB I think? I'm open to other suggestions if you've got any!
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.