Things I wish I knew about state management when I started writing React apps
I&#x27;m one of those &quot;old dogs&quot; who don&#x27;t quite get the advantage of using React in the majority of the cases it&#x27;s used. This article didn&#x27;t really help...<p>&gt; What makes these frontends complex?
State management. The frontend “knows” a lot of things, and these things interact with each other in non-trivial ways [...] Example: dark mode support. For example, say your app has a dark mode. All your rendered components must know what theme is on, so they can render the UI in the right color.<p>Back in my day.... you&#x27;d slap a class on the &lt;body&gt; tag, and you&#x27;d have all you&#x27;d need for your CSS to style the rest of the page accordingly. How is using Redux an improvement here?<p>None of the examples of &quot;complex&quot; front-ends would be at all difficult in an old-school &quot;just re-render the page&quot; setup using something like pjax or turbolinks. And in my experience (seeing web pages with &gt; 1MB js files) it&#x27;d be faster&#x2F;more responsive for the end-user too.