I would recommend using localStorage instead of cookies to store the darkMode state.
This stores the data only on the client and does not send it to the server all the time.
It is easier to work with because it does not need additional parsing, or serialization.
Additionally it is also well supported and meets the IE11 requirement.
Example with darkMode:
// Set darkMode
window.localStorage.setItem('darkModeOn', this.darkModeOn);
// Get darkMode
window.localStorage.getItem('darkModeOn');
I am very willing to create a PR.
I would recommend using localStorage instead of cookies to store the darkMode state.
This stores the data only on the client and does not send it to the server all the time.
It is easier to work with because it does not need additional parsing, or serialization.
Additionally it is also well supported and meets the IE11 requirement.
Example with darkMode:
I am very willing to create a PR.