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

Michael Bradley's photo

No. React is a view layer. HTML, CSS, and JavaScript all have the same concern, to render a view. They are different technologies sharing the same concern in this case. I like that the view and rendering logic are in the same file. It's really all just JavaScript anyway, JSX is not HTML and get's transpiled by React into plain old JavaScript functions.

Here is another explanation of what I mean