<story><title>Why I moved from Angular to React</title><url>https://www.robinwieruch.de/reasons-why-i-moved-from-angular-to-react/</url></story><parent_chain><item><author>gvb</author><text>&lt;i&gt;React comes with its own syntax to build components called JSX. In JSX you can mix up HTML and JavaScript. Additionally people often use inline styles in their elements. It is like adding CSS into the mix.&lt;/i&gt;&lt;p&gt;This really scares me. We spent a lot of effort removing inline styling from HTML with CSS, and yet it still creeps into our HTML. We also have created a lot of &amp;lt;program language dejour&amp;gt; &amp;quot;template&amp;quot; languages (e.g. PHP, Python, ERB, etc.) mixed in with HTML, which also tends to end badly (logic buried in HTML that is hard to find and hard to reason about).&lt;p&gt;How does React solve the &amp;quot;everything mixed into HTML&amp;quot; problem? Are we going down the same path that ended badly last time?</text></item></parent_chain><comment><author>shados</author><text>As mentionned already, and as Pete Hunt famously talked about in &amp;quot;Rethinking Best Practices&amp;quot; (you can find it on youtube), you want to separate -concerns-, not  technologies. Often there is a 1:1 between those things, but not in modern web development.&lt;p&gt;So we&amp;#x27;ve seen a push toward components that mix technologies, but separate concerns. And it&amp;#x27;s been great.</text></comment>
<story><title>Why I moved from Angular to React</title><url>https://www.robinwieruch.de/reasons-why-i-moved-from-angular-to-react/</url></story><parent_chain><item><author>gvb</author><text>&lt;i&gt;React comes with its own syntax to build components called JSX. In JSX you can mix up HTML and JavaScript. Additionally people often use inline styles in their elements. It is like adding CSS into the mix.&lt;/i&gt;&lt;p&gt;This really scares me. We spent a lot of effort removing inline styling from HTML with CSS, and yet it still creeps into our HTML. We also have created a lot of &amp;lt;program language dejour&amp;gt; &amp;quot;template&amp;quot; languages (e.g. PHP, Python, ERB, etc.) mixed in with HTML, which also tends to end badly (logic buried in HTML that is hard to find and hard to reason about).&lt;p&gt;How does React solve the &amp;quot;everything mixed into HTML&amp;quot; problem? Are we going down the same path that ended badly last time?</text></item></parent_chain><comment><author>ariabuckles</author><text>This sounded scary to me at first, but in practice I&amp;#x27;ve found it to be the opposite.&lt;p&gt;Separating css, html, and js makes sense when you&amp;#x27;re writing a document, and the content is the html and the css is strictly formatting.&lt;p&gt;It makes less sense when you&amp;#x27;re writing an app, and the styling of the html is an integral part of what is being created. The javascript works the same way; it&amp;#x27;s often integral to what&amp;#x27;s being rendered, not just patchwork adding small amounts of functionality to an existing document.&lt;p&gt;But probably most importantly is that react gives you a different way of separating concerns: it&amp;#x27;s very easy to put different chunks of the UI into different components&amp;#x2F;files, so your app is divided by functionality, instead of divided by technology. Keeping the html (and sometimes css) with the js that uses it helps increase the cohesion of small units in your UI that intimately work with each other, while separating those from other js&amp;#x2F;html&amp;#x2F;css for other units.</text></comment>