-
Notifications
You must be signed in to change notification settings - Fork 450
Description
🐛 Bug Report
When following the Design Theme documentation, theme values do not persist in local storage when navigating between pages. Instead, they are replaced with null
.
💻 Repro or Code Sample
- Create a Blazor project and configure the Design Theme exactly as described in the documentation.
- Change the theme values and confirm they are written to local storage.
- Navigate to another page.
- Inspect local storage — values have been replaced with
null
.
🤔 Expected Behavior
Theme values should remain stored in local storage and persist across page navigations.
😯 Current Behavior
Local storage values are overwritten with null
whenever navigating between pages.
FluentUiThemePersistIssue.mp4
💁 Possible Solution
The only workaround I’ve found is wrapping routes with:
<Routes @rendermode="InteractiveServer" />
This prevents the null values, but it introduces issues with other links in the application (login, register) and ideally, I don't want to have the whole site in that mode.
Is there a better workaround or a planned fix?
🔦 Context
This issue prevents theme customization from persisting across pages, which disrupts the user experience and breaks the intended design consistency.
🌍 Your Environment
Window 10
VisualStudio 17.14.14
Microsoft.FluentUI.AspNetCore.Components 4.12.1