When you change the preferred theme on your device, this is not something that the localStorage can be aware of without running the Media Query. For this reason, we simply check the theme preference whenever we load the app or refresh it. Just thinking about it logically right now, I think this is all we can do.
I have some ideas though... on how to watch and check for it more often, but it was beyond the scope of this small article. If I do write about that I will update this article with a link or solution I have come up with. Also any ideas are welcome.
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.
When you change the preferred theme on your device, this is not something that the localStorage can be aware of without running the Media Query. For this reason, we simply check the theme preference whenever we load the app or refresh it. Just thinking about it logically right now, I think this is all we can do.
I have some ideas though... on how to watch and check for it more often, but it was beyond the scope of this small article. If I do write about that I will update this article with a link or solution I have come up with. Also any ideas are welcome.