3 ms·
> You can swap CSS classes in JS. But how do you know which classes are available? > You can target HTML elements in JS. But how do you know which elements are
by orange8 6y ago
> You can swap CSS classes in JS. But how do you know which classes are available?
> You can target HTML elements in JS. But how do you know which elements are available?
This assumes someone else is creating the CSS and HTML for you? Have rules or coding and naming conventions like BEM for example. That's what a framework basically is, a set of rules and conventions about how to structure an App. What you need is proper architecture, regardless of whether or not it is based on a popular framework. That's how the popular frameworks started out to begin with.