3 ms·
> The notion that a subtree of the DOM and some JavaScript that manipulates it, designed together to create a single functional component, represent a single co
by wtetzner 11y ago
> The notion that a subtree of the DOM and some JavaScript that manipulates it, designed together to create a single functional component, represent a single concern and should be packaged together, is not unreasonable.
I think part of the problem is how you think about it. You're not writing some HTML and then some Javascript to manipulate it. Conceptually, you're writing a Javascript function to create a chunk of HTML.