Files
nativewind/docs/library-comparision.md
Mark Lawlor 36cc3e20cd Typescript refactor (#18)
* feat: options to control what is transformed
refactor: convert everything to typescript

* 0.0.18-0

* update npm files

* 0.0.19-0

* 0.0.19-1

* switch to commonjs

* 0.0.19-2

* make __useParseTailwind params options

* 0.0.19-3

* correctly default to native-inline

* 0.0.19-4

* add tailwind.config.js instructions to readme

* attempt to fix react-refresh

* 0.0.19-5

* remove state hooks from useParseTailwind

* 0.0.19-6

* Revert "0.0.19-6"

This reverts commit ed8f6a1dde.

* Revert "remove state hooks from useParseTailwind"

This reverts commit 833624dbb5.

* Revert "0.0.19-5"

This reverts commit 6cde5493e4.

* Revert "Revert "0.0.19-5""

This reverts commit 8aff80cd77cc7d85cf84807abad88e6f49cb00aa.

* revert fast refresh hooks

* revert hooks, rename hook

* 0.0.19-7

* updated platforms
2022-04-07 13:45:04 +10:00

1.9 KiB

Overview

Ultimately all these libraries achieve mostly the same result. The difference is either philosophical or implementation details.

These are my notes I made before I created tailwindcss-react-native but they also help explain some of the differences.

tailwind-rn

https://github.com/vadimdemedes/tailwind-rn

tailwind-rn requires you to manually run two extra processes while developing, tailwind-cli and tailwind-rn. These processes the styles and stores them via React context. This method has a couple of flaws

  • The processes may run slower than your web application causing warnings/delays https://github.com/vadimdemedes/tailwind-rn/issues/154
  • Requires custom setup of editor/IDE plugins
  • Rerenders all components when a style has changed
  • Does not support responsive SSR for web (cannot apply varients until hydration)

react-native-tailwindcss

https://github.com/TVke/react-native-tailwindcss

  • Same issues as tailwind-rn

react-native-styled.macro

https://github.com/z0al/react-native-styled.macro

Uses babel macros to compile Tailwind selectors to RN Styles.

  • Does not use Tailwind to compile styles
  • Introduces a new API. Doesn't provide out of box support for varient values
  • Uses a custom config file

react-native-tailwind

https://github.com/MythicalFish/react-native-tailwind

  • Only works with it's exported components

tailwind-react-native

https://github.com/ajsmth/tailwind-react-native

  • Same issues as tailwind-rn
  • Introduces a new API. Doesn't provide out of box support for varient values

react-native-tailwind-classnames

https://github.com/leobauza/react-native-tailwind-classnames

  • Only works with StyledComponents

react-native-tailwind-style

https://github.com/etc-tiago/react-native-tailwind-style

  • Same issues as tailwind-rn

tailwind-react-native-classnames

https://github.com/jaredh159/tailwind-react-native-classnames

  • Same issues as tailwind-rn