3 ms·
Thing is, your one component might share styles with half the other components. Then having a proper separation of code and style with class names to bind the
by jeremiep 11y ago
Thing is, your one component might share styles with half the other components.
Then having a proper separation of code and style with class names to bind the two becomes your only sane option at scale.
- clessg 11y agoimport theme from 'styles/theme';
- DougBTX 11y agoComponents sharing styles is the same as functions sharing constants, so there isn't a fundamental difference here. One benefit of sharing constants is that you can use, eg, TypeScript to compile-time check that all of the constants are defined, making it much easier to remove unused styles.