<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Anish</title>
    <description>The latest articles on DEV Community by Anish (@mrrookie).</description>
    <link>https://dev.to/mrrookie</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F815703%2F8c5af461-8679-4b6d-b961-7ec5d88c3970.jpeg</url>
      <title>DEV Community: Anish</title>
      <link>https://dev.to/mrrookie</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mrrookie"/>
    <language>en</language>
    <item>
      <title>The Subtle Art of State Management Without Redux or Zustand</title>
      <dc:creator>Anish</dc:creator>
      <pubDate>Sat, 30 Aug 2025 11:01:44 +0000</pubDate>
      <link>https://dev.to/mrrookie/the-subtle-art-of-state-management-without-redux-or-zustand-1fjo</link>
      <guid>https://dev.to/mrrookie/the-subtle-art-of-state-management-without-redux-or-zustand-1fjo</guid>
      <description>&lt;p&gt;State management is the frontend engineer’s favorite battleground. Every team has a war story:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Too much prop drilling&lt;/li&gt;
&lt;li&gt;Context providers everywhere&lt;/li&gt;
&lt;li&gt;Redux boilerplate bigger than the app itself&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I’ve seen teams spend weeks debating whether to use Redux, Zustand, MobX, or Context.&lt;/p&gt;

&lt;p&gt;But here’s the thing: you don’t always need a library. With careful patterns, React’s built-ins can take you surprisingly far.&lt;/p&gt;




&lt;ul&gt;
&lt;li&gt;Start with &lt;strong&gt;useState&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Most apps don’t need global state. Local useState is the simplest, fastest, and most debuggable tool.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Figl6qvg6ztiy8d66nsdn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Figl6qvg6ztiy8d66nsdn.png" alt="Use State" width="800" height="590"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When state doesn’t need to escape a component, keep it there.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Reach for &lt;strong&gt;useReducer&lt;/strong&gt; for Complex State&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp62dowv1dgzzzvvz5pfs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp62dowv1dgzzzvvz5pfs.png" alt="Use Reducer" width="800" height="690"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This makes logic predictable without extra libraries.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Context Splitting Beats Prop Drilling&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Context is powerful but easy to misuse. Instead of one giant provider, split contexts by domain.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs1d7dhn2hh61g98whz82.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs1d7dhn2hh61g98whz82.png" alt="Context Markdown" width="800" height="443"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This way, auth updates don’t re-render the entire dashboard, and theme changes don’t ripple unnecessarily through profile components.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuc5w5f0bpdz73slif93e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuc5w5f0bpdz73slif93e.png" alt="AuthContext" width="800" height="352"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Scoped contexts = faster renders.&lt;/p&gt;

&lt;p&gt;Now only auth-related consumers re-render when the auth state changes.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Add Undo/Redo with a Custom Hook&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Sometimes you want time-travel state without Redux. Hooks can do it in a few lines.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3k7z0n6mwb7ekbj3258n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3k7z0n6mwb7ekbj3258n.png" alt="History Redux" width="800" height="614"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now you’ve got a mini Redux with history baked in.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Big Takeaway&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Every abstraction has a cost. Before reaching for Zustand or Redux, ask yourself if you can solve the problem with a combination of useState, useReducer, and a few smart contexts. Most of the time, you can.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Good state management is like good design—it disappears into the background.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;💬 Curious: how far have you pushed React’s built-ins before you needed a state library? Drop your war stories—I’d love to hear them.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>react</category>
      <category>redux</category>
      <category>frontend</category>
    </item>
  </channel>
</rss>
