Closed shawnmclean closed 1 day ago
you need add it explicitly for every item, react-native in general doesn't inherit CSS styles, so you should add for every element text-black dark:text-white
I was looking at the rn-reusables showcase demo and I'm using the same components as them.
I don't see anything special going on with the components.
I ran their project and it works, the expo mobile theme switches, so comparing my setup and theirs, I'm not sure I'm spotting the difference.
I ran into a tailwing config merging issue.
The solution was to ensure that darkMode: class
is at the root config, see comment: https://github.com/shawnmclean/sovoli/commit/e8f2fb970efda864c63b088b957d642a5ad7b80e#r143727607
I've been trying to setup a mono repo with shared components.
So far I have nextjs being able to change the theme correctly.
But on expo, the RN elements are not updating or switching over to dark mode.
Does anyone know how this works? When themes are switched, what happens in react native? Top level style changes or all components rebuilds?
Repro: https://github.com/shawnmclean/sovoli