Q&A: Aphrodite vs CSS Modules? - a podcast by Kent C. Dodds

from 2016-04-08T15:08:06

:: ::

My friend Matt Winchester (https://twitter.com/mwinche) asked me (https://twitter.com/mwinche/status/718282311918362625) what I think of
Aphrodite (https://github.com/Khan/aphrodite) compared to css-modules (https://github.com/css-modules/css-modules). Here's my answer.
Here's an example of me migrating from CSS (processed with PostCSS (https://github.com/postcss/postcss)) to Aphrodite: https://github.com/javascriptair/site/commit/d8b8bf349f6c94a1d00539bb285240615baf5b7d (https://github.com/javascriptair/site/commit/d8b8bf349f6c94a1d00539bb285240615baf5b7d)
Oh! And one other thing I didn't mention as a benefit of Aphrodite that can be a killer feature is because your CSS is colocated with the components that are using it, you can ship only the styles that are needed and used, rather than shipping ALL of your styles. A lot of problems go away when you have an explicit relationship between your styles and your components 👍I hope this is helpful :-) Feel free to ask more questions on my AMA (http://ama.kcd.im)

Further episodes of 3 Minutes with Kent

Further podcasts by Kent C. Dodds

Website of Kent C. Dodds