Re:Persisting React State in LocalStorage
by bobthepanda on Friday February 28, 2020 @03:32PM
(#22446062)
Compatible with everything except IE 11, but in draft: https://developer.mozilla.org/en-US/docs/Web/CSS/@media/pref...
Re:Persisting React State in LocalStorage
by ultrarunner on Friday February 28, 2020 @03:37PM
(#22446111)
We have an application that's used outdoors day and night in some cases. The good news is it makes a ton of difference in usability; the bad news is I honestly still have to search for instructions on toggling dark mode on Ubuntu. The switch is a lot simpler.
Re:Persisting React State in LocalStorage
by geocar on Friday February 28, 2020 @03:55PM
(#22446280)
Hey go nuts. Whatever works for you.
But if you wanted to use other applications that didn't have such a switch, you might consider looking into a hotkey or an extension. I found this[1] after a quick ddg. Maybe it'll help?
[1]: https://extensions.gnome.org/extension/2314/dark-mode-switch...
Sure, it was just an example. :)
I figured as much, but I feel pretty strongly that every piece of state needs to be accessible to a user or to the server, otherwise you lose control of it and that can war on.
I know that for performance reasons, or for privacy reasons, or even for time/effort reasons, that's not always possible, but I'm also always genuinely hopeful that there's some new class of data out there that doesn't fall into that (general) rule.
I think some old browsers didn't, so I guess that's why there are all those tacky switches on blogs these days, but I don't usually worry about obsolete things like "made for netscape 4" banners...
I also think for an application, I'd much prefer my settings on the server so I can get them again when I'm using another device.