@AdamRackis That’s the reason why I’ve been moving back to OOP with dependency injection on the backend. Reliable and easy testing without having to rely on module mocks and specific test tool implementations.
@RyanCarniato With the behavior of Solid there is a risk of introducing perf issues by mixing DOM read/write in author code. Vue behavior matches my intuition. React is… React and Svelte surprised me. I expected the same as with Vue.
Different tradeoffs. 1 2 0 seems like a safe choice.
So that's why I haven't written or spoken much about testing lately. Industry churn is so high (replacing its population every few years) that every battle needs to be fought repeatedly. It's hard to keep at it when the other side is selling what people want: easy answers.
But.
@wheelmaker24 And then things like `classnames` or `brise` or your other tipps can help to reduce the amount of boilerplate needed for creating those sub-components.
@wheelmaker24 So, in my opinion, styling is a primary concern of the component and should be as close to it as possible. That makes a component easier to understand and modify, even if habit suggests otherwise.
When complexity grows, I try to extract sub-components, rather than the styling.
@silvenon You can export arbitrary values in CSS modules using:
:export {
color: theme('https://t.co/LE5cnUm7OJ.500');
}
And then import from the JS side, but instead of hashed classes it'll just have 'color'