I have a question for the Web Components, React, and Angular communities. It is essentially the same question (of course the examples would be slightly different), but I recognize that the answer may be different for each tool.
Is it worth creating three different posts, one for each tool, or should I try to combine them into one post? If so, what can I do to avoid scaring away people who only know one of the tools mentioned? Obviously the best answer would be from someone who knows all three tools well, but I don't see anything wrong with an expert from each camp providing advice for that tool, except for the fact that I can't accept more than one answer.
For reference, the question is something along the lines of this:
From a semantic perspective, are ids legal in the html templates for React Components/Angular Directives/Web Components? From a full document perspective, the answer is probably no. If the component gets used more than once (and there is nothing preventing that from happening) then you wind up with a duplicate id problem. And yet, from a component perspective it makes so much more sense than a class. With the ShadowdDOM especially, each component/directive is like a miniature DOM where is makes more sense to say things like "This is THE left control," instead of "This is A left control."
Why am I asking this question? I'm giving a presentation to a book club on Web Components. Most of the attendees have some Angular experience, so drawing on the similarities and differences seems like a clear option. I'm trying to make sure that my code examples are well constructed, canonical, and clear. Throwing React in the mix is just for intellectual curiosity, since I haven't looked at it yet but I know many people that love it.
I'd love to hear a "We gave some thought to it back when..." or "It isn't really feasible in this case..." or "Actually, inside a you pretty much get a new DOM, so use any ids you need!" from each camp.