3 ms·
Tailwind brings with it the same issues that css-in-js does: the inability to just reload css curing the development cycle. When working with css (or a language
by frob 6y ago
Tailwind brings with it the same issues that css-in-js does: the inability to just reload css curing the development cycle. When working with css (or a language that complies to css), any changes to the style are pushed to the browser without a page refresh. With tailwind and css-in-js, changes to style require changes to js/html and therefore require an entire page reload which both slows down my feedback loop and breaks any state I had established in my test app.
- dawnerd 6y agoIf you use Next.js it's not really an issue but you're right, that is pretty annoying.
- fokinsean 6y ago> With tailwind and css-in-js, changes to style require changes to js/html and therefore require an entire page reload ah!! I was wondering why HMR wasn't working like I remembered the first time I used React. I think the first time I picked up React I used plain CSS, and the CSS would change on the page without reloading. Now I'm using tailwind and material-ui and thought HMR was just busted. I like tailwind but it doesn't play well with material-ui. Material components always take precedence which is super annoying. I might just end up canning tailwind.
- werm82 6y agoNot sure what your setup is, but I'm using tailwind with create-react-app and craco[1], and the changes show up without needing to reload. [1] https://github.com/gsoft-inc/craco https://github.com/gsoft-inc/craco
- frob 6y agoYou can update the tailwind css files as much as you like, but as far as I know, adding or removing class names will trigger a reload.
- jms55 6y agoI used Tailwind in my Phoenix LiveView project, so I don't need to reload.
- richeyryan 6y agoI use Tailwind with Snowpack and style changes are picked up without a page reload.