I have a web platform where user can select dark mode or normal mode. This preference is saved in the database in the backend.
I want to load this parameter first then apply the appropriate style sheet so that after the UI is loaded it shows the mode (dark or normal) the user has selected.
Is there a way to do the api call first then apply the css style sheet?
2.1m questions
2.1m answers
60 comments
57.0k users