2 ms·
> it's obviously taken a hit with the component paradigm Can you please explain how the component paradigm is at odds with semantic markup? Is it just that dev
by mwcampbell 7y ago
> it's obviously taken a hit with the component paradigm
Can you please explain how the component paradigm is at odds with semantic markup? Is it just that developers are now satisfied with the semantics being in their component names and props, and don't care if it actually gets rendered as undifferentiated divs?
My own hypothesis is that React gave developers permission to question some things that were previously deemed sacred in web development, and developers went too far with that. Using a component framework like React or Vue is not inherently at odds with producing good semantic markup.
- playpause 7y ago> Is it just that developers are now satisfied with the semantics being in their component names and props, and don't care if it actually gets rendered as undifferentiated divs? Basically, yes. Also, components often require extra div-nesting for robustness, and then there's the obfuscated classnames (CSS-in-JS), and the way responsiveness tends to be done these days (crude media query helper components that show/hide duplicated subsections of DOM for different devices). This all means the rendered DOM in devtools is bloated and hard to read anyway, so there's less point in caring about keeping it nice and clean. Also, if you're mostly focused on building individual components, you probably don't feel as much ownership over the page as a whole, so you don't think about how your rendered DOM affects the document outline. Without that bigger picture, semantics isn't as interesting.