Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I've really enjoyed tailwind after using styled for a while.

At least for my applications, the computers my users run on can't handle the performance implications of styled.

But beyond the performance, I legitimately build faster using tailwind. I also find it easier to understand the components others build as well.



We’re making the switch at the moment and, after a bit of a learning bump, everyone is flying along with it now. It’s basically inline-styles++ with having all the context right there but not having the edge cases that require breaking out into classes to use media queries etc.

It was a little struggle at first with our previous setup, but I spent a week or so moving everything over to Vite with hot module replacement which has been life changing.


Completely agree.

This whole discussion feels silly after a day building things with Tailwind. The system, defaults, docs and tooling are excellent.

And dev speed is ludicrous.


Fully agree. It's usually the people that have never worked with it that share their opinion, always ending with "why do we need this"

Can encourage others to give it a try as well. Dev productivity through the roof indeed :)


Comparing Tailwind with Web Components might be a bit unfair. It is well known that Web Components have terrible dev ergonomics.

It would be more fair to compare with frameworks that work with scoped styles (such as Svelte or Vue’s single file components). Developing in these is also an excellent productivity boost.


Can anyone give some references on that Web Components have bad dev ergonomics? Is it just that Web Components don't allow passing of complex types so you have to stringify everything?


I see many people have problem with that in the comments here. However I don’t find that to be an issue. Passing properties (as opposed to attributes) allows complex types and many popular frameworks have a handy shorthand for it (e.g. in lit-html you write `<my-component .prop=${[1, 2, 3]}>`).

In my opinion the bad ergonomics is actually when authoring the components (not consuming it). Many of the faults have been excellently pointed out previously[1]. The most glaring the boilerplate you have to write if you want your attributes to reflect a property.

This has an easy fix though, which is that you simply don’t write your web components by hand. You either use a library (like lit-element[2]) or a compiler (like stencil[3]). I’m personally waiting for a less opinionated compiler with a smaller runtime then stencil (preferably no runtime; perhaps that is Svelte with a web component target, I haven’t tried it).

There is also a proposal for a declarative shadow DOM[4], which aims to tackle some of the bad dev experience we have with web components. However I’m personally a little skeptic that it is a good proposal, or that it will fix what most web component devs are concerned about.

1: https://dev.to/richharris/why-i-don-t-use-web-components-2ci...

2: https://github.com/lit/lit-element

3: https://stenciljs.com/

4: https://github.com/whatwg/dom/issues/831


Thanks for the response, I appreciate it!


It is not well known that web components have terrible dev ex, because it isn't true.


Trying to get my team to consider the switch from Bootstrap to Tailwind. All of this talk makes me jealous


Nothing beats a live demo.


Haven't heard of this until now. Looks like a cleaner version of Bootstrap?


It's kind of like bootstrap except it's more focused on the developer building styles instead of having a number of prebuilt styles.

It also is more based on what css can do instead of having it's own abstraction. Most of the class names in Tailwind are very close to their css key+value equivalents. For example if you wanted to write `float: right` in css you'd use the Tailwind class `float-right`.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: