Button components use the default theme instead of the custom theme on initial render #5863
Unanswered
purplecandy
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The Button components are initializing with the default theme on the first render, ignoring the persisted theme from localStorage. This issue is unique to the Button components and does not affect other components.
Expected Behavior:
The Button components should apply the persisted theme (e.g., dark) immediately on the first render.
Actual Behavior:
On the first render, Button components use the default theme (e.g., light) even when the persisted theme is dark. The correct theme is only applied in follow-up re-renders.
Screen.Recording.2024-11-18.at.2.12.58.AM.mov
I have taken the example from the docs here. Interestingly, even if I have
dark
as the default theme it somehow infers the default theme from somewhereAny help would be appreciated in trying to figure it out, thanks
Beta Was this translation helpful? Give feedback.
All reactions