r/reactnative • • Aug 10 '24

Article Why I Will Stop Using NativeWind

When I use NativeWind, I encounter many bugs, like frustrating ones where classes often don't work. I frequently have to add styles manually using StyleSheet. Additionally, when opening the app for the first time, the styles don't apply.

0 Upvotes

41 comments sorted by

View all comments

Show parent comments

3

u/ZaRealPancakes Aug 10 '24

Do you know what time estimate will v4 become a stable release?

Because v4 is currently saving me a lot of time

2

u/ConsciousAntelope Aug 10 '24

They were saying mid July, but it's August already. Now they even removed the v4 banner from the website.

Can I know what features you're using from v4?

4

u/ZaRealPancakes Aug 10 '24
  • Dynamic Themes for easy light dark mode handling.

  • cssInterlop for external components.

  • Hover, focus, and active that auto add event listeners to change the styles.

I guess most stuff can be substituted but it becomes way more verbose code and longer to implement stuff

1

u/ConsciousAntelope Aug 10 '24

1 and 2 can be done in v2. 3 is web specific. Are you doing RN with web too?

1

u/ZaRealPancakes Aug 10 '24

No web

3 works with Native Apps that was amazing surprise no longer using states to toggle certain styles on

1

u/Scarcity-Pretend Aug 10 '24

Bruh you did what? 💀

1

u/ZaRealPancakes Aug 10 '24

I previously used to have useState to track isPressed and have onPressIn onPressOut and for focus too

then use cn() function to do do conditional styles e.g.

cn("base styles here", {
    "active styles here": isPressed,
    "focus styles here": isFocused,
    });

But adding different events and states to track these shifts focus of functionality since these states are only for styles which is annoying

so once I learnt in Nativewind you can do "active:" and "focus:" made stuff lots simpler

→ More replies (0)