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

That example doesn't use shorthands to be more clear, and shows the styled utility function which is a more advanced case of wanting to define a group of styles nicely. Which is incidentally fixing a couple of the problems in TFA.

If you just want the simple Tailwind experience you can use shorthands only in those, or even closer just import <Stack /> or <Text /> directly and use shorthands with typed tokens. It's there in a few of the first examples.

The upside there is they are just regular props that are typed and have object de-structure and re-structure.

  import { Stack } from 'tamagui'

  <Stack p="$2" mx="$1" bc="red" />


My hunch is that the author of the article wouldn't like these shortcuts either :)


He proposed exactly them as the solution!




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

Search: