Does React really violate Separation of Concern by putting HTML and JS in a single file?

View other answers to this thread
Start a personal dev blog on your domain for free and grow your readership.

3.4K+ developers have started their personal blogs on Hashnode in the last one month.

Write in Markdown · Publish articles on custom domain · Gain readership on day zero · Automatic GitHub backup and more

Dan Shappir's photo

Separation of concerns, no. React components encapsulate both presentation (HTML/CSS) and behavior (JavaScript). It does potentially violate separation of responsibilities, because JavaScript is written by devs, and HTML is often written by designers. Putting them together limits the ability of designers to modify the HTML.