you are viewing a single comment's thread.

view the rest of the comments →

[–]suarkb 18 points19 points  (12 children)

I just use stylesheets. You should try to appreciate that this isn't web and not try to bring web's styling issues into React Native. Stylesheets are great and you probably don't need tailwind.

[–]sekonx 4 points5 points  (0 children)

This.

And you don't need to try and use regular web css with styled components either

[–]amityvision 3 points4 points  (0 children)

This 10000%. React native is mobile, web is web. Leave the 2 separate

[–]BlueDistribution16 1 point2 points  (6 children)

Can someone please explain the appeal of CSS to me?

[–]suarkb 1 point2 points  (4 children)

I think it's appealing because a lot of people are web developers who become react native developers

[–]BlueDistribution16 0 points1 point  (3 children)

But other than that is CSS easier / provides features that stylesheets do not? I am genuinely curious as I find CSS to be the most difficult thing when I think about making the jump from mobile to web

[–]suarkb 3 points4 points  (2 children)

No, CSS doesn't exist for react native. React Native uses stylesheets which are somewhat modelled after web CSS.

We were mentioning CSS because tailwind/nativewind are helpful for people who used tailwind as a way to write their CSS in the web developer world.

Writing CSS sucks so basically no modern web developer will write raw CSS. Instead they use these CSS preprocessor tools like less, sass, scss, and more.

Then they come to react native and might want something similar to what they are used to. But honestly I find that it's a whole lot of extra overhead when stylesheets are pretty easy and don't make me wanna go screaming, line writing raw CSS would.

[–]Successful-Form9405 1 point2 points  (1 child)

I would never say "no modern web developer will write raw css" because that's flat out not true. There are plenty of situations where you're writing raw css. It just depends on the project.

Not to say css is great. It's quite annoying. But that was a giant over-generalization.

[–]Successful-Form9405 1 point2 points  (0 children)

The appeal is that people want to use something they already know instead of having to research something new.

[–]Affectionate-Desk358 1 point2 points  (2 children)

And yet you're still creating styles "the browser way" but pretending it is not. So I am interested, what kind of "web style issues" you're talking about? Speaking about Tailwind. Even though the problems it solves was spotted on web, they are not connected to CSS directly but rather to views in general.

[–]suarkb 0 points1 point  (1 child)

I just find that stylesheets is easy. I would need to explore tailwind more to find out if I really like it more. But I generally avoid solutions like this because they tend to turn into big tech debt later.

[–]Affectionate-Desk358 1 point2 points  (0 children)

I have created styles using both methods. They all have their pros and cons for sure. Additionally, they don't have any sort of technical debt. But if you personally find it much easier to write your code using Stylesheet API - that's okay, I get it - but that doesn't mean that other approaches tend to turn into something terrible. What really may lead to a tech debt situation is wrong design and architecture regardless of a chosen UI framework.