Relative Content

Tag Archive for cachingblazorrenderdarkmode

Dark/Light theme rendering issue Blazor .NET8

I’m trying to add a class ‘dark’ if it is in localstorage, and remove it if there is ‘light’ as ‘mode’ in localstorage.
However, I have the feeling that all pages of my blazor .NET8 application are cached. It saves the mode in local storage, but when I switch pages it doesn’t execute the javascript ‘onload’ statement. Only if I then manually refresh the page again.