nativewind / nativewind

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

dark class toggle not working on web #882

Closed vktrl closed 1 month ago

vktrl commented 2 months 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 2 months ago

I have the same issue

danstepanov commented 1 month ago

Closed as duplicate of #917