marklawlor / nativewind

React Native utility-first universal design system - powered by Tailwind CSS
https://nativewind.dev
MIT License
4.3k stars 233 forks source link

dark class toggle not working on web #882

Open vktrl opened 1 month ago

vktrl commented 1 month ago

Setting dark mode in the browser results in undefined being added as a class instead of dark. This happens both when using colorScheme.toggle(), colorScheme.set("dark") and methods from useColorScheme. It works fine on native.

I haven't found a way to reliably replicate this behavior. I've moved code verbatim from one repo to another but it's inconsistent. The only clue I have is that the class being set is undefined, but I haven't tracked down the potential cause in the codebase and I'm not very familiar with RN. For now I'm handling the class toggle manually.

PNPM monorepo Nativewind 4.0.36 Tailwind 3.4.1

AchrafBn commented 1 month ago

I have the same issue