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

What’s funny is I see too much API surface complexity everywhere - a big part of the reason Tamagui exists! For example the entire suite of web specs is insane and never ending, with CSS growing by the day.

Some replies: you don’t have to use a special stack you can pass in any component. Theme values and media props are definitely a bit of sugar but hardly magic - they map 1 to 1 to CSS and the other most popular style libraries. And writing them any other way (cross platform) simply doesn’t exist or is much much more complex, so I see them as both necessary and incredibly easy to understand coming from CSS.

The styled function is the whole point! That’s the whole library so that can’t really go away, and it’s just a plain old function there’s 0 magic there.

useMediaPropsActive is a utility function exported for very advanced use cases and it says as much in the docs.

I’ll give you variants, those are borrowed from Stitches and other libraries. They solve several problems elegantly and are also easy to understand. If there’s only one new thing to learn with something as complex as a style library, I’ll take that. Especially with how nice variants are.



I understand where you're coming from, but no, these are not plain functions. This is an optimizing compiler. How long do you think it would take you to read and start understanding how it works: https://github.com/tamagui/tamagui/tree/master/packages

No disagreeing that it can be a nice experience using a system like this where things "just work" if you stay within their boundaries; but there is no denying the sheer complexity of it. It is absolutely magic vs say, a bit of HTML + CSS - in which case you can consider what's going on inside the browser as magic.


I’d agree with you if the compiler was mandatory, but it’s not. In fact the docs recommend not setting it up until you are ready to deploy to production. It very much is just a function.




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

Search: