What happened?
Uniwind.updateCSSVariables(theme, variables) does not reliably trigger UI updates for components rendered under when the updated theme differs from the globally active theme.
On web, runtime variable overrides for non-global themes are also not consistently observable via getWebVariable / useCSSVariable, because resolution depends on document.documentElement and computed styles without consulting per-theme runtime state.
Steps to Reproduce
<ScopedTheme theme="premium">
<View className="bg-background size-20" />
</ScopedTheme>
<Button
title="Update"
onPress={() =>
Uniwind.updateCSSVariables('premium', {
'--color-background': '#ff0000',
})
}
/>
Snack or Repository Link
https://github.com/sascha-kaleidoscode/uniwind-scoped-theme-update-bug-repo
Uniwind version
1.6.2
React Native Version
0.81.5
Platforms
Android, iOS, Web
Expo
Yes
Additional information
What happened?
Uniwind.updateCSSVariables(theme, variables) does not reliably trigger UI updates for components rendered under when the updated theme differs from the globally active theme.
On web, runtime variable overrides for non-global themes are also not consistently observable via getWebVariable / useCSSVariable, because resolution depends on document.documentElement and computed styles without consulting per-theme runtime state.
Steps to Reproduce
Snack or Repository Link
https://github.com/sascha-kaleidoscode/uniwind-scoped-theme-update-bug-repo
Uniwind version
1.6.2
React Native Version
0.81.5
Platforms
Android, iOS, Web
Expo
Yes
Additional information