<?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>Forem: Usama</title>
    <description>The latest articles on Forem by Usama (@usama_dev).</description>
    <link>https://forem.com/usama_dev</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%2F3445914%2F2718075f-dedb-41bc-ad21-44e8d0713ad5.jpg</url>
      <title>Forem: Usama</title>
      <link>https://forem.com/usama_dev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/usama_dev"/>
    <language>en</language>
    <item>
      <title>The Hardest Phase in Development No One Talks About</title>
      <dc:creator>Usama</dc:creator>
      <pubDate>Sun, 12 Apr 2026 16:07:49 +0000</pubDate>
      <link>https://forem.com/usama_dev/the-hardest-phase-in-development-no-one-talks-about-1c6g</link>
      <guid>https://forem.com/usama_dev/the-hardest-phase-in-development-no-one-talks-about-1c6g</guid>
      <description>&lt;p&gt;When people think about software development, they usually imagine one thing:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Coding.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Writing functions.&lt;br&gt;&lt;br&gt;
Fixing bugs.&lt;br&gt;&lt;br&gt;
Building UI.  &lt;/p&gt;

&lt;p&gt;And yes, that part is hard… in the beginning.&lt;/p&gt;

&lt;p&gt;But after spending enough time—months, maybe a year—you realize something uncomfortable:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Coding is not the hardest part anymore.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  The Phase That Breaks You
&lt;/h2&gt;

&lt;p&gt;Right now, I’m going through a phase that feels completely different.&lt;/p&gt;

&lt;p&gt;I can code.&lt;br&gt;&lt;br&gt;
I can build components.&lt;br&gt;&lt;br&gt;
I can follow tutorials.&lt;br&gt;&lt;br&gt;
I can even complete projects.&lt;/p&gt;

&lt;p&gt;But when I sit down to build something &lt;strong&gt;on my own from scratch&lt;/strong&gt;, my mind goes blank.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What should I build first?&lt;/li&gt;
&lt;li&gt;How should I structure this system?&lt;/li&gt;
&lt;li&gt;How will different parts connect?&lt;/li&gt;
&lt;li&gt;What happens when this scales?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is the phase I call:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Architecture Thinking&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And honestly… it’s painful.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why This Phase Feels So Difficult
&lt;/h2&gt;

&lt;p&gt;Because suddenly:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;There is &lt;strong&gt;no step-by-step guide&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;There is &lt;strong&gt;no exact tutorial&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;There is &lt;strong&gt;no copy-paste solution&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You are forced to think.&lt;/p&gt;

&lt;p&gt;Not just write code—but &lt;strong&gt;design systems&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;And that’s a completely different skill.&lt;/p&gt;




&lt;h2&gt;
  
  
  You Can’t Learn This From Tutorials Alone
&lt;/h2&gt;

&lt;p&gt;This is something I’ve realized the hard way:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;YouTube can teach syntax
&lt;/li&gt;
&lt;li&gt;Courses can teach frameworks
&lt;/li&gt;
&lt;li&gt;AI can help you debug
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But &lt;strong&gt;none of them can fully teach you how to think like an engineer.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Because architecture thinking is not about:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;“How to write code”&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It’s about:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;“What code should exist in the first place?”&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  The Truth No One Tells You
&lt;/h2&gt;

&lt;p&gt;There is no single:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Perfect course
&lt;/li&gt;
&lt;li&gt;Perfect book
&lt;/li&gt;
&lt;li&gt;Perfect roadmap
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That will magically give you this skill.&lt;/p&gt;

&lt;p&gt;Because this phase requires something uncomfortable:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Struggling with unclear problems.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  My Current Approach (Still Learning)
&lt;/h2&gt;

&lt;p&gt;I’m not an expert yet.&lt;br&gt;&lt;br&gt;
I’m still in this phase.&lt;br&gt;&lt;br&gt;
Still confused. Still learning.&lt;/p&gt;

&lt;p&gt;But one thing is slowly helping me:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Start With the Big Picture
&lt;/h3&gt;

&lt;p&gt;Before writing code, I try to ask:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What is the goal of this system?&lt;/li&gt;
&lt;li&gt;Who is using it?&lt;/li&gt;
&lt;li&gt;What are the main parts?&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  2. Break It Into Small Pieces
&lt;/h3&gt;

&lt;p&gt;Instead of thinking:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Build entire app”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I think:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Authentication&lt;/li&gt;
&lt;li&gt;Dashboard&lt;/li&gt;
&lt;li&gt;Data flow&lt;/li&gt;
&lt;li&gt;API structure&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Small, understandable chunks.&lt;/p&gt;




&lt;h3&gt;
  
  
  3. Think Before Coding
&lt;/h3&gt;

&lt;p&gt;Earlier, I used to jump directly into coding.&lt;/p&gt;

&lt;p&gt;Now I try to pause and ask:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Why this approach?&lt;/li&gt;
&lt;li&gt;Is there a simpler way?&lt;/li&gt;
&lt;li&gt;What will break later?&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  4. Accept the Pain
&lt;/h3&gt;

&lt;p&gt;This is the hardest part.&lt;/p&gt;

&lt;p&gt;Because this phase feels like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Slow progress
&lt;/li&gt;
&lt;li&gt;Confusion
&lt;/li&gt;
&lt;li&gt;Self-doubt
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But I’m starting to believe:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;This pain is a sign of growth.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Where I Stand Right Now
&lt;/h2&gt;

&lt;p&gt;I’m not someone who has mastered architecture.&lt;/p&gt;

&lt;p&gt;I’m someone who is &lt;strong&gt;experiencing it for the first time.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;And it’s uncomfortable.&lt;/p&gt;

&lt;p&gt;But it also feels like:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I’m finally moving from “coder” → “engineer”&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Final Thought
&lt;/h2&gt;

&lt;p&gt;If you’re also feeling stuck at this stage…&lt;/p&gt;

&lt;p&gt;If coding feels easy but building systems feels impossible…&lt;/p&gt;

&lt;p&gt;Then maybe you’re not lost.&lt;/p&gt;

&lt;p&gt;Maybe…&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;You’ve just entered the hardest phase of development.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And that’s exactly where real growth begins.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>I Had to Stop Writing to Start Understanding</title>
      <dc:creator>Usama</dc:creator>
      <pubDate>Thu, 02 Apr 2026 16:09:23 +0000</pubDate>
      <link>https://forem.com/usama_dev/i-had-to-stop-writing-to-start-understanding-41ap</link>
      <guid>https://forem.com/usama_dev/i-had-to-stop-writing-to-start-understanding-41ap</guid>
      <description>&lt;p&gt;I didn’t plan this.&lt;/p&gt;

&lt;p&gt;I started writing blogs because I wanted my message to reach beyond my circle. I wanted to help people — even if it was in a small way. Writing felt like a bridge between what I was learning and what others might need.&lt;/p&gt;

&lt;p&gt;But now… I’ve decided to stop. At least for a while.&lt;/p&gt;

&lt;p&gt;Not because I’ve lost interest.&lt;br&gt;
Not because I’ve run out of ideas.&lt;/p&gt;

&lt;p&gt;But because I finally understood something uncomfortable:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I know concepts… but I don’t truly understand them.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  The Illusion of Knowing
&lt;/h2&gt;

&lt;p&gt;As developers, we often feel like we “get it.”&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We can build a UI&lt;/li&gt;
&lt;li&gt;We can use state&lt;/li&gt;
&lt;li&gt;We can set up routing&lt;/li&gt;
&lt;li&gt;We can make things work&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But is that enough?&lt;/p&gt;

&lt;p&gt;I realized something while working:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Knowing &lt;em&gt;how&lt;/em&gt; to do something is very different from knowing &lt;em&gt;why&lt;/em&gt;, &lt;em&gt;when&lt;/em&gt;, and &lt;em&gt;what happens if it breaks&lt;/em&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;p&gt;Everyone can create a UI.&lt;/p&gt;

&lt;p&gt;But:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Can you design a UI that aligns with how a client &lt;em&gt;thinks&lt;/em&gt;?&lt;/li&gt;
&lt;li&gt;Can you predict where it might fail?&lt;/li&gt;
&lt;li&gt;Can you explain your UI decisions clearly to a non-technical person?&lt;/li&gt;
&lt;li&gt;Can you design interactions that feel natural instead of forced?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That’s a completely different level.&lt;/p&gt;

&lt;p&gt;And I’m not there yet.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Real Gap: Depth
&lt;/h2&gt;

&lt;p&gt;Right now, my biggest struggle is not learning new things.&lt;/p&gt;

&lt;p&gt;It’s &lt;strong&gt;going deep into the things I already “know.”&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Some concepts take:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;2 days&lt;/li&gt;
&lt;li&gt;3 days&lt;/li&gt;
&lt;li&gt;Sometimes even more&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And still… they don’t fully click.&lt;/p&gt;

&lt;p&gt;Things like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;State management (beyond basic usage)&lt;/li&gt;
&lt;li&gt;Routing logic and data flow&lt;/li&gt;
&lt;li&gt;Component architecture&lt;/li&gt;
&lt;li&gt;UI behavior under edge cases&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are not things you can “finish” in a day and write a blog about.&lt;/p&gt;

&lt;p&gt;They demand:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Isolation&lt;/li&gt;
&lt;li&gt;Focus&lt;/li&gt;
&lt;li&gt;Repetition&lt;/li&gt;
&lt;li&gt;Failure&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And honestly… patience.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why I’m Pausing My Blogs
&lt;/h2&gt;

&lt;p&gt;I used to write regularly.&lt;/p&gt;

&lt;p&gt;But now I’ve realized:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Writing fast is slowing down my understanding.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If I keep pushing myself to write weekly or daily:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I’ll only explain surface-level ideas&lt;/li&gt;
&lt;li&gt;I’ll repeat what others are already saying&lt;/li&gt;
&lt;li&gt;I won’t grow beyond a certain point&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And that’s not what I want anymore.&lt;/p&gt;

&lt;p&gt;So I made a hard decision:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I will write less… but understand more.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  A Shift in Identity
&lt;/h2&gt;

&lt;p&gt;Earlier, I was writing as a &lt;em&gt;learner documenting the journey&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Now, I want to write as:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Someone who has struggled with a concept long enough to truly understand it.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Not just:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;“Here’s how you use it”&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;“Here’s how it breaks”&lt;/li&gt;
&lt;li&gt;“Here’s what nobody tells you”&lt;/li&gt;
&lt;li&gt;“Here’s what actually matters in real projects”&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That kind of writing takes time.&lt;/p&gt;

&lt;p&gt;And right now, I need that time for myself.&lt;/p&gt;




&lt;h2&gt;
  
  
  About AI and Fear
&lt;/h2&gt;

&lt;p&gt;There’s another pressure we all feel today.&lt;/p&gt;

&lt;p&gt;AI.&lt;/p&gt;

&lt;p&gt;Everywhere you look, there’s noise:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;“AI will replace developers”&lt;/li&gt;
&lt;li&gt;“Learn faster or fall behind”&lt;/li&gt;
&lt;li&gt;“Do more in less time”&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And honestly… it’s overwhelming.&lt;/p&gt;

&lt;p&gt;But I’ve come to a simple belief:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If you’re doing something, do it with your heart.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Because in the end:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Tools will change&lt;/li&gt;
&lt;li&gt;Trends will change&lt;/li&gt;
&lt;li&gt;Speed will change&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But &lt;strong&gt;depth will always matter.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;AI can generate code.&lt;/p&gt;

&lt;p&gt;But:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Can it understand your client deeply?&lt;/li&gt;
&lt;li&gt;Can it feel the friction in a user experience?&lt;/li&gt;
&lt;li&gt;Can it make intentional decisions for your product?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That’s where we still matter.&lt;/p&gt;




&lt;h2&gt;
  
  
  This Is Not an End
&lt;/h2&gt;

&lt;p&gt;I’m not quitting writing.&lt;/p&gt;

&lt;p&gt;I’m just… stepping back.&lt;/p&gt;

&lt;p&gt;Learning slowly.&lt;br&gt;
Understanding deeply.&lt;br&gt;
Building real clarity.&lt;/p&gt;

&lt;p&gt;And when I come back:&lt;/p&gt;

&lt;p&gt;It won’t be frequent.&lt;/p&gt;

&lt;p&gt;But it will be real.&lt;/p&gt;




&lt;h2&gt;
  
  
  Final Thought
&lt;/h2&gt;

&lt;p&gt;If you’re in the same place — feeling like you “know things” but not deeply enough…&lt;/p&gt;

&lt;p&gt;You’re not behind.&lt;/p&gt;

&lt;p&gt;You’re just at the point where real learning begins.&lt;/p&gt;

&lt;p&gt;Take your time.&lt;/p&gt;

&lt;p&gt;Go deeper.&lt;/p&gt;

&lt;p&gt;And don’t rush your growth just to stay visible.&lt;/p&gt;

&lt;p&gt;Because sometimes…&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Silence builds stronger developers than noise ever can.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>devjournal</category>
      <category>learning</category>
      <category>programming</category>
      <category>writing</category>
    </item>
    <item>
      <title>The Day I Finally Understood `useActionData` (React Router)</title>
      <dc:creator>Usama</dc:creator>
      <pubDate>Sun, 29 Mar 2026 12:46:59 +0000</pubDate>
      <link>https://forem.com/usama_dev/the-day-i-finally-understood-useactiondata-react-router-51ao</link>
      <guid>https://forem.com/usama_dev/the-day-i-finally-understood-useactiondata-react-router-51ao</guid>
      <description>&lt;p&gt;There are some concepts in programming that don’t just confuse you… they &lt;em&gt;haunt&lt;/em&gt; you.&lt;/p&gt;

&lt;p&gt;For me, one of those concepts was &lt;strong&gt;&lt;code&gt;useActionData&lt;/code&gt; in React Router&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;I remember clearly — when I first learned it, everything made sense. I implemented it, it worked, and I moved on.&lt;/p&gt;

&lt;p&gt;But then…&lt;/p&gt;

&lt;p&gt;A few days later, I opened my old code, looked at it, and thought:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“What is this doing… and why did I even write this?”&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  The Confusion
&lt;/h2&gt;

&lt;p&gt;I even tried reading the definition again:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;“Returns the data from the last action.”&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Simple sentence.&lt;br&gt;
Zero clarity.&lt;/p&gt;

&lt;p&gt;I watched YouTube videos.&lt;br&gt;
Still confused.&lt;/p&gt;

&lt;p&gt;I checked my own code.&lt;br&gt;
Even more confused.&lt;/p&gt;

&lt;p&gt;At that point, I realized something important:&lt;/p&gt;

&lt;p&gt;👉 I didn’t need &lt;em&gt;more information&lt;/em&gt;&lt;br&gt;
👉 I needed a &lt;strong&gt;clear mental model&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Let’s Break It Down (In Simple Language)
&lt;/h2&gt;

&lt;p&gt;Think of &lt;code&gt;useActionData&lt;/code&gt; like this:&lt;/p&gt;

&lt;p&gt;👉 It is a way to &lt;strong&gt;get the result of a form submission handled by React Router&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That’s it.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Real Flow (Step-by-Step)
&lt;/h2&gt;

&lt;p&gt;Let me explain what actually happens behind the scenes.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. You create a form using React Router
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Form&lt;/span&gt; &lt;span class="na"&gt;method&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"post"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;input&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"username"&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"submit"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Submit&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Form&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is not a normal form.&lt;/p&gt;

&lt;p&gt;This form is connected to React Router.&lt;/p&gt;




&lt;h3&gt;
  
  
  2. You define an &lt;code&gt;action&lt;/code&gt; function in your route
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;action&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;request&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;formData&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;formData&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;username&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;formData&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;username&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;username&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;error&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Username is required&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;success&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Form submitted successfully&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;👉 This &lt;code&gt;action&lt;/code&gt; runs when the form is submitted&lt;br&gt;
👉 It processes the data&lt;br&gt;
👉 It returns something (important!)&lt;/p&gt;




&lt;h3&gt;
  
  
  3. Now comes &lt;code&gt;useActionData&lt;/code&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useActionData&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;👉 This hook gives you &lt;strong&gt;whatever the action returned&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  The Key Idea (THIS is what I was missing)
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;useActionData&lt;/code&gt; = &lt;strong&gt;“Show me the result of my last form submission”&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Why Do We Even Need It?
&lt;/h2&gt;

&lt;p&gt;Because after submitting a form, we often want to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Show errors (validation)&lt;/li&gt;
&lt;li&gt;Show success messages&lt;/li&gt;
&lt;li&gt;Show server responses&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And React Router gives us a clean way to do that.&lt;/p&gt;




&lt;h2&gt;
  
  
  Real Example (Now It Makes Sense)
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useActionData&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="p"&gt;&amp;lt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Form&lt;/span&gt; &lt;span class="na"&gt;method&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"post"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;input&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"username"&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"submit"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Submit&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nc"&gt;Form&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

    &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt; &lt;span class="na"&gt;style&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;red&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
    &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;?.&lt;/span&gt;&lt;span class="nx"&gt;success&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;success&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;&amp;lt;/&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  What’s Actually Happening?
&lt;/h2&gt;

&lt;p&gt;Let me say it in &lt;em&gt;very simple words&lt;/em&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;User submits the form&lt;/li&gt;
&lt;li&gt;React Router calls the &lt;code&gt;action&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;action&lt;/code&gt; processes data and returns something&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;useActionData&lt;/code&gt; receives that return value&lt;/li&gt;
&lt;li&gt;UI updates based on it&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  The Mistake I Was Making
&lt;/h2&gt;

&lt;p&gt;I was thinking:&lt;/p&gt;

&lt;p&gt;❌ “This is some complicated magic function”&lt;/p&gt;

&lt;p&gt;But in reality:&lt;/p&gt;

&lt;p&gt;✅ It’s just a &lt;strong&gt;bridge between backend logic (action) and UI&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  One Line Summary (For Future Me)
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;code&gt;useActionData&lt;/code&gt; is used to &lt;strong&gt;access and display the result of a form submission handled by a route action.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  When Should You Use It?
&lt;/h2&gt;

&lt;p&gt;Use it when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You are using &lt;code&gt;&amp;lt;Form&amp;gt;&lt;/code&gt; from React Router&lt;/li&gt;
&lt;li&gt;You have an &lt;code&gt;action&lt;/code&gt; function&lt;/li&gt;
&lt;li&gt;You want to show &lt;strong&gt;errors or results without manual state&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  When NOT to Use It
&lt;/h2&gt;

&lt;p&gt;Don’t use it when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You’re using normal React forms (&lt;code&gt;onSubmit&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;You’re handling everything with &lt;code&gt;useState&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;No &lt;code&gt;action&lt;/code&gt; function is involved&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Final Thought
&lt;/h2&gt;

&lt;p&gt;This concept confused me not because it was hard…&lt;/p&gt;

&lt;p&gt;…but because I didn’t understand the &lt;strong&gt;flow&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Now I do.&lt;/p&gt;

&lt;p&gt;And if future me ever gets confused again:&lt;/p&gt;

&lt;p&gt;👉 Just remember:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Form → Action → Return → useActionData → UI&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That’s the whole story.&lt;/p&gt;

</description>
      <category>react</category>
      <category>frontend</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Week 24: Redux Toolkit Finally Made Redux Feel Simple + Deep Dive into React Router Data Fetching</title>
      <dc:creator>Usama</dc:creator>
      <pubDate>Wed, 25 Mar 2026 16:24:32 +0000</pubDate>
      <link>https://forem.com/usama_dev/week-24-redux-toolkit-finally-made-redux-feel-simple-deep-dive-into-react-router-data-fetching-2efl</link>
      <guid>https://forem.com/usama_dev/week-24-redux-toolkit-finally-made-redux-feel-simple-deep-dive-into-react-router-data-fetching-2efl</guid>
      <description>&lt;p&gt;This week felt like a shift.&lt;/p&gt;

&lt;p&gt;Not because I learned something completely new…&lt;br&gt;
But because things that once felt complex &lt;strong&gt;started becoming simple&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;I moved from classic Redux to &lt;strong&gt;Redux Toolkit&lt;/strong&gt;, and at the same time, I started understanding &lt;strong&gt;React Router at a deeper level&lt;/strong&gt; — especially how data fetching actually works.&lt;/p&gt;




&lt;h2&gt;
  
  
  From Redux Complexity to Redux Toolkit Simplicity
&lt;/h2&gt;

&lt;p&gt;Before this week, Redux felt structured… but heavy.&lt;/p&gt;

&lt;p&gt;For a single feature, I had to think about:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;action types&lt;/li&gt;
&lt;li&gt;action creators&lt;/li&gt;
&lt;li&gt;reducers&lt;/li&gt;
&lt;li&gt;store setup&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It worked, but it didn’t feel efficient.&lt;/p&gt;

&lt;p&gt;Then I started using &lt;strong&gt;Redux Toolkit&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;And honestly… it changed how I see Redux.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Moment Redux Toolkit Clicked
&lt;/h2&gt;

&lt;p&gt;Two things made the biggest difference for me:&lt;/p&gt;

&lt;h3&gt;
  
  
  1️⃣ &lt;code&gt;configureStore&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Earlier, setting up a store required multiple functions.&lt;/p&gt;

&lt;p&gt;Now it’s just:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;one clean configuration&lt;/li&gt;
&lt;li&gt;everything handled internally&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;No unnecessary setup.&lt;br&gt;
No confusion.&lt;/p&gt;




&lt;h3&gt;
  
  
  2️⃣ &lt;code&gt;createSlice&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;This was the biggest upgrade.&lt;/p&gt;

&lt;p&gt;Instead of writing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;action types&lt;/li&gt;
&lt;li&gt;action creators&lt;/li&gt;
&lt;li&gt;reducers&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I can now define everything in one place.&lt;/p&gt;

&lt;p&gt;That means:&lt;/p&gt;

&lt;p&gt;👉 Less boilerplate&lt;br&gt;
👉 Cleaner code&lt;br&gt;
👉 Better structure&lt;/p&gt;

&lt;p&gt;For the first time, Redux felt &lt;strong&gt;practical&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Middleware &amp;amp; Thunks — Real-World Logic
&lt;/h2&gt;

&lt;p&gt;I continued working with &lt;strong&gt;Redux Thunk&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This helped me understand how Redux handles:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;API calls&lt;/li&gt;
&lt;li&gt;async logic&lt;/li&gt;
&lt;li&gt;delayed actions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Instead of putting everything inside components, I started moving logic into Redux.&lt;/p&gt;

&lt;p&gt;This made my components:&lt;/p&gt;

&lt;p&gt;👉 cleaner&lt;br&gt;
👉 easier to manage&lt;/p&gt;




&lt;h2&gt;
  
  
  React Router — Not Just Navigation Anymore
&lt;/h2&gt;

&lt;p&gt;This week I also went deeper into &lt;strong&gt;React Router&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Before, I used it only for navigation.&lt;/p&gt;

&lt;p&gt;Now I started understanding:&lt;/p&gt;

&lt;p&gt;👉 It’s not just routing&lt;br&gt;
👉 It’s also about &lt;strong&gt;data flow&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Understanding &lt;code&gt;createBrowserRouter&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;Instead of defining routes in a simple way, I explored a more structured approach.&lt;/p&gt;

&lt;p&gt;Routes now feel like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a configuration system&lt;/li&gt;
&lt;li&gt;not just components&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This makes large applications easier to manage.&lt;/p&gt;




&lt;h2&gt;
  
  
  Data Fetching with React Router (Big Realization)
&lt;/h2&gt;

&lt;p&gt;This was the most interesting part of the week.&lt;/p&gt;

&lt;p&gt;Before:&lt;/p&gt;

&lt;p&gt;I used to fetch data inside components using &lt;code&gt;useEffect&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Now:&lt;/p&gt;

&lt;p&gt;React Router allows fetching data &lt;strong&gt;before the component renders&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;That means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;better user experience&lt;/li&gt;
&lt;li&gt;cleaner components&lt;/li&gt;
&lt;li&gt;more predictable data flow&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This felt like a more &lt;strong&gt;professional approach&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  What Changed for Me This Week
&lt;/h2&gt;

&lt;p&gt;Before Week 24:&lt;/p&gt;

&lt;p&gt;Redux felt heavy.&lt;br&gt;
Routing felt basic.&lt;/p&gt;

&lt;p&gt;After Week 24:&lt;/p&gt;

&lt;p&gt;Redux feels &lt;strong&gt;simpler and cleaner&lt;/strong&gt;.&lt;br&gt;
Routing feels &lt;strong&gt;more powerful and structured&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Key Takeaways
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Redux Toolkit reduces unnecessary complexity&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;configureStore&lt;/code&gt; simplifies setup&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;createSlice&lt;/code&gt; organizes everything in one place&lt;/li&gt;
&lt;li&gt;Thunks help handle real-world async logic&lt;/li&gt;
&lt;li&gt;React Router is more than just navigation&lt;/li&gt;
&lt;li&gt;Route-based data fetching improves architecture&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;This week wasn’t about learning more tools.&lt;/p&gt;

&lt;p&gt;It was about learning &lt;strong&gt;better ways to use them&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;That’s the difference.&lt;/p&gt;

&lt;p&gt;And slowly, things are starting to connect.&lt;/p&gt;




&lt;p&gt;If you're learning React and Redux, my advice:&lt;/p&gt;

&lt;p&gt;Don’t just follow tutorials.&lt;/p&gt;

&lt;p&gt;Try to understand:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;how data flows&lt;/li&gt;
&lt;li&gt;where logic should live&lt;/li&gt;
&lt;li&gt;how to structure things properly&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That’s where real growth happens.&lt;/p&gt;

</description>
      <category>react</category>
      <category>redux</category>
      <category>frontend</category>
      <category>javascript</category>
    </item>
    <item>
      <title>I Finally Understood How to Pass Multiple Values in Redux Toolkit (The Right Way)</title>
      <dc:creator>Usama</dc:creator>
      <pubDate>Thu, 19 Mar 2026 00:47:11 +0000</pubDate>
      <link>https://forem.com/usama_dev/i-finally-understood-how-to-pass-multiple-values-in-redux-toolkit-the-right-way-21k</link>
      <guid>https://forem.com/usama_dev/i-finally-understood-how-to-pass-multiple-values-in-redux-toolkit-the-right-way-21k</guid>
      <description>&lt;p&gt;Today was one of those small learning moments…&lt;br&gt;
but it completely changed how I write Redux logic.&lt;/p&gt;

&lt;p&gt;I used to think:&lt;/p&gt;

&lt;p&gt;👉 “Redux actions can only take one value”&lt;br&gt;
👉 “If I need more data, things will get messy”&lt;/p&gt;

&lt;p&gt;But today I learned a clean and scalable way to handle &lt;strong&gt;multiple values in Redux Toolkit&lt;/strong&gt; using the &lt;code&gt;prepare&lt;/code&gt; function.&lt;/p&gt;


&lt;h2&gt;
  
  
  The Problem I Faced
&lt;/h2&gt;

&lt;p&gt;I was trying to dispatch an action like this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Loan amount&lt;/li&gt;
&lt;li&gt;Loan purpose&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;At first, I didn’t know how to pass both values properly.&lt;/p&gt;

&lt;p&gt;I thought maybe I need:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;multiple actions&lt;/li&gt;
&lt;li&gt;or a complex payload structure&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But that would make things messy and hard to maintain.&lt;/p&gt;


&lt;h2&gt;
  
  
  The Solution: &lt;code&gt;prepare&lt;/code&gt; Function in Redux Toolkit
&lt;/h2&gt;

&lt;p&gt;Then I discovered something powerful inside &lt;code&gt;createSlice&lt;/code&gt;:&lt;/p&gt;

&lt;p&gt;👉 The &lt;code&gt;prepare&lt;/code&gt; method&lt;/p&gt;

&lt;p&gt;Here’s the code I worked with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;requestLoan&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;prepare&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;purpose&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;purpose&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;};&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;

  &lt;span class="nf"&gt;reducer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;action&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;loan&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;loan&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;action&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;loanPurpose&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;action&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;purpose&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;balance&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="nx"&gt;action&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  What’s Happening Here?
&lt;/h2&gt;

&lt;p&gt;This is what I understood:&lt;/p&gt;

&lt;h3&gt;
  
  
  1️⃣ &lt;code&gt;prepare&lt;/code&gt; Handles Multiple Arguments
&lt;/h3&gt;

&lt;p&gt;Instead of passing one object manually, I can do this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nf"&gt;dispatch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;requestLoan&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;5000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Buy Car&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And &lt;code&gt;prepare&lt;/code&gt; converts it into:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;5000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;purpose&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Buy Car&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Clean. Structured. Scalable.&lt;/p&gt;




&lt;h3&gt;
  
  
  2️⃣ Reducer Stays Simple
&lt;/h3&gt;

&lt;p&gt;Inside the reducer, I don’t worry about arguments anymore.&lt;/p&gt;

&lt;p&gt;I just use:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;action.payload.amount&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;action.payload.purpose&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Everything is already organized.&lt;/p&gt;




&lt;h3&gt;
  
  
  3️⃣ Logic Feels More Professional
&lt;/h3&gt;

&lt;p&gt;This approach helped me:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;avoid messy payload creation in components&lt;/li&gt;
&lt;li&gt;keep logic centralized&lt;/li&gt;
&lt;li&gt;write cleaner and more readable reducers&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Why This Matters
&lt;/h2&gt;

&lt;p&gt;Before this, I was thinking in a limited way.&lt;/p&gt;

&lt;p&gt;Now I understand:&lt;/p&gt;

&lt;p&gt;👉 Redux Toolkit is designed to &lt;strong&gt;simplify complex patterns&lt;/strong&gt;&lt;br&gt;
👉 You don’t need hacks — just the right tools&lt;/p&gt;

&lt;p&gt;Using &lt;code&gt;prepare&lt;/code&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;makes actions flexible&lt;/li&gt;
&lt;li&gt;keeps reducers clean&lt;/li&gt;
&lt;li&gt;improves scalability&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  My Key Takeaway
&lt;/h2&gt;

&lt;p&gt;Today I learned:&lt;/p&gt;

&lt;p&gt;You don’t need multiple actions for multiple values.&lt;/p&gt;

&lt;p&gt;You just need a &lt;strong&gt;better way to structure your payload&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;And &lt;code&gt;prepare&lt;/code&gt; gives you exactly that.&lt;/p&gt;




&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;This wasn’t a big feature.&lt;/p&gt;

&lt;p&gt;But it was a &lt;strong&gt;big mindset shift&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Redux Toolkit is not just about writing less code…&lt;/p&gt;

&lt;p&gt;It’s about writing &lt;strong&gt;smarter and cleaner code&lt;/strong&gt;.&lt;/p&gt;




&lt;p&gt;If you're learning Redux Toolkit, don’t ignore small features like this.&lt;/p&gt;

&lt;p&gt;Sometimes, these small things make the biggest difference.&lt;/p&gt;

</description>
      <category>react</category>
      <category>redux</category>
      <category>frontend</category>
      <category>webdev</category>
    </item>
    <item>
      <title>why start i use redux toolkit? why not classic redux?</title>
      <dc:creator>Usama</dc:creator>
      <pubDate>Tue, 17 Mar 2026 17:32:56 +0000</pubDate>
      <link>https://forem.com/usama_dev/why-start-i-use-redux-toolkit-why-not-classic-redux-2cji</link>
      <guid>https://forem.com/usama_dev/why-start-i-use-redux-toolkit-why-not-classic-redux-2cji</guid>
      <description>&lt;p&gt;I Was Writing 4 Redux Functions for Everything… Until Redux Toolkit Changed It&lt;/p&gt;

&lt;p&gt;When I first started learning Redux, I thought this was just how things worked.&lt;/p&gt;

&lt;p&gt;If I needed to manage a simple feature, I had to write:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Action types&lt;/li&gt;
&lt;li&gt;Action creators&lt;/li&gt;
&lt;li&gt;Reducers&lt;/li&gt;
&lt;li&gt;Store configuration&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;At first, it felt “professional”.&lt;/p&gt;

&lt;p&gt;But after a few days, it started to feel… repetitive.&lt;/p&gt;

&lt;p&gt;And honestly, a bit exhausting.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Problem With Classic Redux (From My Experience)
&lt;/h2&gt;

&lt;p&gt;Let me be real.&lt;/p&gt;

&lt;p&gt;Redux is powerful. No doubt.&lt;/p&gt;

&lt;p&gt;But as a beginner, I kept asking myself:&lt;/p&gt;

&lt;p&gt;Why do I need &lt;strong&gt;so much code&lt;/strong&gt; just to update a simple state?&lt;/p&gt;

&lt;p&gt;For one feature, I was jumping between multiple files:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;actions.js&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;reducers.js&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;store.js&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And inside those files:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;writing constants&lt;/li&gt;
&lt;li&gt;writing functions&lt;/li&gt;
&lt;li&gt;writing switch cases&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It felt like I was doing the same thing again and again.&lt;/p&gt;




&lt;h2&gt;
  
  
  Then I Discovered Redux Toolkit
&lt;/h2&gt;

&lt;p&gt;Today, I finally spent time understanding &lt;strong&gt;Redux Toolkit&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;And this is where everything started to change.&lt;/p&gt;

&lt;p&gt;Redux Toolkit is basically the &lt;strong&gt;modern way of writing Redux&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;It removes the unnecessary complexity and keeps the power.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Moment That Changed Everything
&lt;/h2&gt;

&lt;p&gt;There were two functions that completely changed my understanding:&lt;/p&gt;

&lt;h3&gt;
  
  
  1️⃣ &lt;code&gt;configureStore&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Before:&lt;/p&gt;

&lt;p&gt;I had to manually use:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;createStore&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;combineReducers&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;applyMiddleware&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now:&lt;/p&gt;

&lt;p&gt;Just one function:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;store&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;configureStore&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;reducer&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;rootReducer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That’s it.&lt;/p&gt;

&lt;p&gt;Everything is handled internally.&lt;/p&gt;

&lt;p&gt;No extra setup.&lt;/p&gt;




&lt;h3&gt;
  
  
  2️⃣ &lt;code&gt;createSlice&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;This one honestly surprised me.&lt;/p&gt;

&lt;p&gt;Before, I had to write:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;action types&lt;/li&gt;
&lt;li&gt;action creators&lt;/li&gt;
&lt;li&gt;reducers&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Separately.&lt;/p&gt;

&lt;p&gt;Now:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;counterSlice&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;createSlice&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;counter&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;initialState&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="na"&gt;reducers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;increment&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And just like that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;actions are created automatically&lt;/li&gt;
&lt;li&gt;reducer is created automatically&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One function replaces &lt;strong&gt;3–4 things&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Best Part: Cleaner Code
&lt;/h2&gt;

&lt;p&gt;What I really liked is how clean everything feels now.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No switch statements&lt;/li&gt;
&lt;li&gt;No scattered files&lt;/li&gt;
&lt;li&gt;No repeated boilerplate&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Everything lives in one place.&lt;/p&gt;

&lt;p&gt;And for the first time, Redux felt… simple.&lt;/p&gt;




&lt;h2&gt;
  
  
  A Small But Important Realization
&lt;/h2&gt;

&lt;p&gt;Another thing I learned today:&lt;/p&gt;

&lt;p&gt;You don’t have to switch everything at once.&lt;/p&gt;

&lt;p&gt;You can use:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;classic Redux&lt;/li&gt;
&lt;li&gt;Redux Toolkit&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;in the same project&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;And both connect to React in the same way.&lt;/p&gt;

&lt;p&gt;That means you can &lt;strong&gt;migrate step by step&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;No pressure.&lt;/p&gt;




&lt;h2&gt;
  
  
  What I Learned Today
&lt;/h2&gt;

&lt;p&gt;Today wasn’t about building something big.&lt;/p&gt;

&lt;p&gt;It was about understanding:&lt;/p&gt;

&lt;p&gt;How to write &lt;strong&gt;better Redux code&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;How to reduce unnecessary complexity.&lt;/p&gt;

&lt;p&gt;How to focus more on logic instead of boilerplate.&lt;/p&gt;




&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;Before today, Redux felt like a lot of work.&lt;/p&gt;

&lt;p&gt;After understanding Redux Toolkit, it finally started to feel practical.&lt;/p&gt;

&lt;p&gt;If you’re learning Redux right now, my honest advice:&lt;/p&gt;

&lt;p&gt;Don’t just learn classic Redux.&lt;/p&gt;

&lt;p&gt;Learn &lt;strong&gt;Redux Toolkit early&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;It will save you time, energy, and a lot of confusion.&lt;/p&gt;

</description>
      <category>react</category>
      <category>redux</category>
      <category>frontend</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Week 23: I Finally Went Deep Into Redux (And It Started Making Sense)</title>
      <dc:creator>Usama</dc:creator>
      <pubDate>Tue, 17 Mar 2026 17:24:02 +0000</pubDate>
      <link>https://forem.com/usama_dev/week-23-i-finally-went-deep-into-redux-and-it-started-making-sense-4o5o</link>
      <guid>https://forem.com/usama_dev/week-23-i-finally-went-deep-into-redux-and-it-started-making-sense-4o5o</guid>
      <description>&lt;p&gt;This week was intense.&lt;/p&gt;

&lt;p&gt;Not because Redux is impossible…&lt;br&gt;
But because I finally stopped just “using” it — and started &lt;strong&gt;understanding how it actually works under the hood&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;And that changed everything.&lt;/p&gt;




&lt;h2&gt;
  
  
  From Confusion to Clarity
&lt;/h2&gt;

&lt;p&gt;Before this week, Redux felt like a set of rules I had to follow:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Dispatch this&lt;/li&gt;
&lt;li&gt;Write that reducer&lt;/li&gt;
&lt;li&gt;Create actions&lt;/li&gt;
&lt;li&gt;Connect everything&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It worked… but I didn’t fully &lt;em&gt;get it&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;This week, I decided to go deeper.&lt;/p&gt;




&lt;h2&gt;
  
  
  Understanding the Redux Store (The Brain)
&lt;/h2&gt;

&lt;p&gt;The biggest realization:&lt;/p&gt;

&lt;p&gt;Redux Store is not just storage.&lt;/p&gt;

&lt;p&gt;It’s the &lt;strong&gt;single source of truth&lt;/strong&gt; for the entire application.&lt;/p&gt;

&lt;p&gt;Everything flows through it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;State lives here&lt;/li&gt;
&lt;li&gt;Actions go here&lt;/li&gt;
&lt;li&gt;Reducers update it&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once I understood this flow, Redux stopped feeling random.&lt;/p&gt;

&lt;p&gt;It started feeling &lt;strong&gt;predictable&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Action Creator Functions (Not Just Functions)
&lt;/h2&gt;

&lt;p&gt;Earlier, I used to think action creators were just “extra functions”.&lt;/p&gt;

&lt;p&gt;But now I understand their real purpose:&lt;/p&gt;

&lt;p&gt;They make actions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;reusable&lt;/li&gt;
&lt;li&gt;consistent&lt;/li&gt;
&lt;li&gt;easier to manage&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Instead of manually creating objects every time, action creators standardize everything.&lt;/p&gt;




&lt;h2&gt;
  
  
  Redux File Structure (Why It Matters)
&lt;/h2&gt;

&lt;p&gt;This week I also explored proper file structure.&lt;/p&gt;

&lt;p&gt;Before, my files were scattered.&lt;/p&gt;

&lt;p&gt;Now I understand why developers organize Redux like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;store.js&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;features/&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;separate slices or reducers&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A good structure is not about “clean folders”.&lt;/p&gt;

&lt;p&gt;It’s about &lt;strong&gt;scalability&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Because when your app grows, bad structure becomes a real problem.&lt;/p&gt;




&lt;h2&gt;
  
  
  Dispatching (The Trigger Point)
&lt;/h2&gt;

&lt;p&gt;Dispatch finally clicked for me.&lt;/p&gt;

&lt;p&gt;It’s not just a function.&lt;/p&gt;

&lt;p&gt;It’s the &lt;strong&gt;only way to change state&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;That means:&lt;/p&gt;

&lt;p&gt;No direct updates.&lt;br&gt;
No shortcuts.&lt;/p&gt;

&lt;p&gt;Everything must go through dispatch.&lt;/p&gt;

&lt;p&gt;And that’s what makes Redux predictable.&lt;/p&gt;




&lt;h2&gt;
  
  
  Redux Middleware (The Hidden Power)
&lt;/h2&gt;

&lt;p&gt;This was one of the most interesting parts of the week.&lt;/p&gt;

&lt;p&gt;Middleware sits between:&lt;/p&gt;

&lt;p&gt;👉 Action → Reducer&lt;/p&gt;

&lt;p&gt;And it can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;log actions&lt;/li&gt;
&lt;li&gt;handle async logic&lt;/li&gt;
&lt;li&gt;modify behavior&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It’s like a &lt;strong&gt;gatekeeper&lt;/strong&gt; for your state flow.&lt;/p&gt;




&lt;h2&gt;
  
  
  Thunks (Handling Async Like a Pro)
&lt;/h2&gt;

&lt;p&gt;Before learning thunks, I didn’t fully understand how Redux handles async code.&lt;/p&gt;

&lt;p&gt;Now I do.&lt;/p&gt;

&lt;p&gt;Thunks allow us to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;write async logic&lt;/li&gt;
&lt;li&gt;delay dispatching&lt;/li&gt;
&lt;li&gt;handle API calls&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is where Redux becomes truly powerful.&lt;/p&gt;




&lt;h2&gt;
  
  
  Making API Calls with Redux
&lt;/h2&gt;

&lt;p&gt;This was a big step.&lt;/p&gt;

&lt;p&gt;Instead of calling APIs directly in components, I learned to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;move logic into Redux&lt;/li&gt;
&lt;li&gt;handle loading states&lt;/li&gt;
&lt;li&gt;manage success and errors&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now the data flow feels:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;cleaner&lt;/li&gt;
&lt;li&gt;centralized&lt;/li&gt;
&lt;li&gt;easier to debug&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Redux DevTools (Game Changer)
&lt;/h2&gt;

&lt;p&gt;If there is one tool that made the biggest difference this week, it’s Redux DevTools.&lt;/p&gt;

&lt;p&gt;Before:&lt;/p&gt;

&lt;p&gt;Debugging felt messy.&lt;/p&gt;

&lt;p&gt;After:&lt;/p&gt;

&lt;p&gt;I can see:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;every action&lt;/li&gt;
&lt;li&gt;every state change&lt;/li&gt;
&lt;li&gt;full history of my app&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And the best part?&lt;/p&gt;

&lt;p&gt;👉 Time-travel debugging&lt;/p&gt;

&lt;p&gt;I can literally go back and see where things broke.&lt;/p&gt;

&lt;p&gt;That’s insane.&lt;/p&gt;




&lt;h2&gt;
  
  
  What Changed for Me This Week
&lt;/h2&gt;

&lt;p&gt;Before Week 23:&lt;/p&gt;

&lt;p&gt;Redux felt complicated.&lt;/p&gt;

&lt;p&gt;After Week 23:&lt;/p&gt;

&lt;p&gt;Redux feels &lt;strong&gt;structured and logical&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;I won’t say it’s “easy” yet.&lt;/p&gt;

&lt;p&gt;But now I understand:&lt;/p&gt;

&lt;p&gt;👉 Why things are done&lt;br&gt;
👉 Not just how they are done&lt;/p&gt;

&lt;p&gt;And that’s a big shift.&lt;/p&gt;




&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;This week wasn’t about building fancy UI.&lt;/p&gt;

&lt;p&gt;It was about building &lt;strong&gt;mental clarity&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Understanding:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;how data flows&lt;/li&gt;
&lt;li&gt;how state is managed&lt;/li&gt;
&lt;li&gt;how real applications scale&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Redux is not just a library.&lt;/p&gt;

&lt;p&gt;It’s a way of thinking.&lt;/p&gt;

&lt;p&gt;And this week, I finally started thinking like it.&lt;/p&gt;




&lt;p&gt;If you’re learning Redux, don’t rush.&lt;/p&gt;

&lt;p&gt;Take time to understand:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Store&lt;/li&gt;
&lt;li&gt;Dispatch&lt;/li&gt;
&lt;li&gt;Middleware&lt;/li&gt;
&lt;li&gt;Async flow&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Because once it clicks…&lt;/p&gt;

&lt;p&gt;Everything starts making sense.&lt;/p&gt;

</description>
      <category>react</category>
      <category>redux</category>
      <category>frontend</category>
      <category>webdev</category>
    </item>
    <item>
      <title>I Thought Redux DevTools Was Just a Fancy Logger — Until I Actually Used It</title>
      <dc:creator>Usama</dc:creator>
      <pubDate>Sun, 15 Mar 2026 11:53:25 +0000</pubDate>
      <link>https://forem.com/usama_dev/i-thought-redux-devtools-was-just-a-fancy-logger-until-i-actually-used-it-2a68</link>
      <guid>https://forem.com/usama_dev/i-thought-redux-devtools-was-just-a-fancy-logger-until-i-actually-used-it-2a68</guid>
      <description>&lt;p&gt;When I first started learning Redux, I thought &lt;strong&gt;Redux DevTools was just another debugging tool&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;You know… something like &lt;code&gt;console.log()&lt;/code&gt; but with a better UI.&lt;/p&gt;

&lt;p&gt;But when I actually started building real features, I realized something surprising:&lt;/p&gt;

&lt;p&gt;Redux DevTools is not just a debugger.&lt;br&gt;
It is a &lt;strong&gt;complete timeline of your application's brain&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;And once you understand that, debugging Redux becomes &lt;strong&gt;10x easier&lt;/strong&gt;.&lt;/p&gt;


&lt;h2&gt;
  
  
  The Problem I Faced While Learning Redux
&lt;/h2&gt;

&lt;p&gt;While building a feature in my React project, I had a simple flow:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;User clicks a button&lt;/li&gt;
&lt;li&gt;An action dispatches&lt;/li&gt;
&lt;li&gt;The reducer updates the state&lt;/li&gt;
&lt;li&gt;UI re-renders&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Simple right?&lt;/p&gt;

&lt;p&gt;But something weird happened.&lt;/p&gt;

&lt;p&gt;The UI was not updating the way I expected.&lt;/p&gt;

&lt;p&gt;At first I tried:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;console.log(action)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;console.log(state)&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;checking reducers manually&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But after a few actions, the logs became messy.&lt;/p&gt;

&lt;p&gt;I couldn't clearly understand:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Which action triggered the bug&lt;/li&gt;
&lt;li&gt;What the &lt;strong&gt;previous state&lt;/strong&gt; was&lt;/li&gt;
&lt;li&gt;What the &lt;strong&gt;next state&lt;/strong&gt; became&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That is where Redux DevTools completely changed the debugging experience.&lt;/p&gt;


&lt;h2&gt;
  
  
  What Redux DevTools Actually Does
&lt;/h2&gt;

&lt;p&gt;Redux DevTools is a browser extension that lets developers &lt;strong&gt;inspect every action and state change in a Redux application&lt;/strong&gt;. ([Artoon Solutions][1])&lt;/p&gt;

&lt;p&gt;Instead of guessing what happened in your application, you can literally &lt;strong&gt;see the entire state timeline&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Think of it like a &lt;strong&gt;recording of everything that happened in your Redux store&lt;/strong&gt;.&lt;/p&gt;


&lt;h2&gt;
  
  
  The Feature That Blew My Mind: Time Travel Debugging
&lt;/h2&gt;

&lt;p&gt;This was the moment I realized why Redux DevTools is powerful.&lt;/p&gt;

&lt;p&gt;Redux DevTools allows something called &lt;strong&gt;time-travel debugging&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Meaning:&lt;/p&gt;

&lt;p&gt;You can move backward and forward through your application's state history. ([Colin.js][2])&lt;/p&gt;

&lt;p&gt;Yes… literally.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Action 1 → LOGIN_USER
Action 2 → ADD_ITEM
Action 3 → REMOVE_ITEM
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can click any action and Redux DevTools will show:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Previous State&lt;/li&gt;
&lt;li&gt;Action Payload&lt;/li&gt;
&lt;li&gt;Next State&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This means you can instantly see &lt;strong&gt;which action broke your app&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;No guessing.&lt;/p&gt;




&lt;h2&gt;
  
  
  Real Example: Debugging a Cart Bug
&lt;/h2&gt;

&lt;p&gt;Imagine you're building an &lt;strong&gt;e-commerce cart&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;A user adds a product and the quantity becomes wrong.&lt;/p&gt;

&lt;p&gt;Without Redux DevTools:&lt;/p&gt;

&lt;p&gt;You would probably add logs everywhere.&lt;/p&gt;

&lt;p&gt;With Redux DevTools:&lt;/p&gt;

&lt;p&gt;You just open the DevTools and see:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="err"&gt;ADD_PRODUCT&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="err"&gt;previousState:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;cart:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;span class="err"&gt;nextState:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;cart:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;id:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;quantity:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}]&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Boom.&lt;/p&gt;

&lt;p&gt;Now you instantly know the reducer logic is wrong.&lt;/p&gt;

&lt;p&gt;This is why many teams use DevTools to &lt;strong&gt;trace bugs in complex applications&lt;/strong&gt;. ([pixeeto.com][3])&lt;/p&gt;




&lt;h2&gt;
  
  
  My Favorite Redux DevTools Features
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1️⃣ Action History
&lt;/h3&gt;

&lt;p&gt;Every action is recorded.&lt;/p&gt;

&lt;p&gt;You can see:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;action type&lt;/li&gt;
&lt;li&gt;payload&lt;/li&gt;
&lt;li&gt;timestamp&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This helps you understand &lt;strong&gt;exactly what triggered a state change&lt;/strong&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  2️⃣ State Tree Inspector
&lt;/h3&gt;

&lt;p&gt;You can inspect the &lt;strong&gt;entire Redux store&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Nested objects, arrays, everything.&lt;/p&gt;

&lt;p&gt;No more &lt;code&gt;console.log(state)&lt;/code&gt; everywhere.&lt;/p&gt;




&lt;h3&gt;
  
  
  3️⃣ Action Replay
&lt;/h3&gt;

&lt;p&gt;You can replay actions.&lt;/p&gt;

&lt;p&gt;Meaning you can reproduce bugs without manually repeating user steps.&lt;/p&gt;

&lt;p&gt;This is extremely useful when debugging.&lt;/p&gt;




&lt;h3&gt;
  
  
  4️⃣ Import / Export State
&lt;/h3&gt;

&lt;p&gt;You can export the state snapshot and send it to another developer.&lt;/p&gt;

&lt;p&gt;They can load it and reproduce the exact bug scenario.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Biggest Lesson I Learned
&lt;/h2&gt;

&lt;p&gt;Before Redux DevTools:&lt;/p&gt;

&lt;p&gt;Debugging Redux felt confusing.&lt;/p&gt;

&lt;p&gt;After Redux DevTools:&lt;/p&gt;

&lt;p&gt;Redux actually became &lt;strong&gt;one of the easiest things to debug&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Because everything is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;predictable&lt;/li&gt;
&lt;li&gt;visible&lt;/li&gt;
&lt;li&gt;traceable&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Redux forces your application to follow a clear data flow.&lt;/p&gt;

&lt;p&gt;And DevTools lets you &lt;strong&gt;watch that flow step by step&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  One Important Tip
&lt;/h2&gt;

&lt;p&gt;Never enable Redux DevTools in production.&lt;/p&gt;

&lt;p&gt;Because it exposes the entire state of your application.&lt;/p&gt;

&lt;p&gt;Use it only in development mode.&lt;/p&gt;




&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;At first, Redux DevTools looked like just another extension.&lt;/p&gt;

&lt;p&gt;But once I started using it during real debugging, I realized something:&lt;/p&gt;

&lt;p&gt;It’s not just a tool.&lt;/p&gt;

&lt;p&gt;It’s like having &lt;strong&gt;X-ray vision into your application's state&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;And once you get used to it, debugging Redux without DevTools feels almost impossible.&lt;/p&gt;




&lt;p&gt;If you're learning Redux right now, my advice is simple:&lt;/p&gt;

&lt;p&gt;Don't just install Redux DevTools.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Actually learn how to read the action timeline.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Because that's where Redux truly starts making sense.&lt;/p&gt;

</description>
      <category>react</category>
      <category>redux</category>
      <category>frontend</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Why Redux Middleware Exists (And The Moment It Finally Made Sense to Me)</title>
      <dc:creator>Usama</dc:creator>
      <pubDate>Sat, 14 Mar 2026 11:19:52 +0000</pubDate>
      <link>https://forem.com/usama_dev/why-redux-middleware-exists-and-the-moment-it-finally-made-sense-to-me-3m3b</link>
      <guid>https://forem.com/usama_dev/why-redux-middleware-exists-and-the-moment-it-finally-made-sense-to-me-3m3b</guid>
      <description>&lt;p&gt;Today and yesterday I spent time trying to understand a single lecture about &lt;strong&gt;Redux middleware&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The lecture itself was not very long, but the concept required deeper attention. Sometimes a small topic takes longer because it changes how you think about the system.&lt;/p&gt;

&lt;p&gt;I also learned a little about &lt;strong&gt;loading states&lt;/strong&gt;, but that part was relatively straightforward. The real challenge for me was understanding &lt;strong&gt;middleware&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;At first, it didn’t fully click.&lt;/p&gt;

&lt;p&gt;So I watched the lecture again, asked questions, and even used ChatGPT to clarify some parts until the concept became clearer.&lt;/p&gt;

&lt;p&gt;Now I want to explain it in the simple way that made it finally click for me.&lt;/p&gt;




&lt;h2&gt;
  
  
  What Is Redux Middleware?
&lt;/h2&gt;

&lt;p&gt;Middleware is something that sits &lt;strong&gt;between dispatching an action and the reducer processing that action&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;In simple terms, middleware can &lt;strong&gt;intercept actions before they reach the reducer&lt;/strong&gt; and perform additional logic.&lt;/p&gt;

&lt;p&gt;This could include things like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;logging actions&lt;/li&gt;
&lt;li&gt;handling asynchronous requests&lt;/li&gt;
&lt;li&gt;modifying actions&lt;/li&gt;
&lt;li&gt;dispatching new actions&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Redux Toolkit vs Classic Redux
&lt;/h2&gt;

&lt;p&gt;One interesting thing I discovered is that &lt;strong&gt;Redux Toolkit already includes middleware by default&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;So if you are using Redux Toolkit, you usually &lt;strong&gt;don’t need to manually add it&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;However, since I started learning with &lt;strong&gt;classic Redux&lt;/strong&gt;, I had to install and configure middleware manually.&lt;/p&gt;

&lt;p&gt;The steps were simple:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Install the middleware&lt;/li&gt;
&lt;li&gt;Add it when creating the Redux store&lt;/li&gt;
&lt;li&gt;Apply it using Redux functions&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;But the important part is not the setup — it’s understanding &lt;strong&gt;why middleware exists&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Problem Middleware Solves
&lt;/h2&gt;

&lt;p&gt;Normally in Redux, when we dispatch an action, it must be a &lt;strong&gt;plain JavaScript object&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;type:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"account/deposit"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;payload:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Redux reducers expect actions to be &lt;strong&gt;simple objects&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Because of this rule, we &lt;strong&gt;cannot dispatch functions directly&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Where Middleware Helps
&lt;/h2&gt;

&lt;p&gt;Middleware changes this limitation.&lt;/p&gt;

&lt;p&gt;With middleware (for example &lt;strong&gt;Redux Thunk&lt;/strong&gt;), we can &lt;strong&gt;dispatch functions instead of plain objects&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This allows us to write logic like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;fetching data from APIs&lt;/li&gt;
&lt;li&gt;performing asynchronous operations&lt;/li&gt;
&lt;li&gt;dispatching multiple actions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Instead of sending an object directly, we send a &lt;strong&gt;function that contains logic&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;That function can then dispatch real actions after the async work finishes.&lt;/p&gt;

&lt;p&gt;This was the moment when the concept finally &lt;strong&gt;clicked for me&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  My Current Understanding
&lt;/h2&gt;

&lt;p&gt;Right now my mental model is this:&lt;/p&gt;

&lt;p&gt;Normal Redux flow:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Action → Dispatch → Reducer → New State
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Redux with middleware:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Action / Function → Middleware → Reducer → New State
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Middleware acts like a &lt;strong&gt;processing layer&lt;/strong&gt; that can control what happens before the reducer runs.&lt;/p&gt;




&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;The lecture itself wasn’t very long, but the concept required patience to fully understand.&lt;/p&gt;

&lt;p&gt;Sometimes learning programming is not about rushing through lectures. It’s about slowing down, repeating concepts, and waiting for that &lt;strong&gt;“click moment”&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Today was one of those moments for me.&lt;/p&gt;

&lt;p&gt;Understanding middleware made Redux architecture feel much clearer.&lt;/p&gt;

&lt;p&gt;And step by step, the bigger picture is starting to form.&lt;/p&gt;

</description>
      <category>react</category>
      <category>redux</category>
      <category>freelance</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Redux vs Context API — Same Energy, Different Power Level</title>
      <dc:creator>Usama</dc:creator>
      <pubDate>Wed, 11 Mar 2026 17:10:47 +0000</pubDate>
      <link>https://forem.com/usama_dev/redux-vs-context-api-same-energy-different-power-level-2jjj</link>
      <guid>https://forem.com/usama_dev/redux-vs-context-api-same-energy-different-power-level-2jjj</guid>
      <description>&lt;p&gt;I need to be honest with you about something.&lt;/p&gt;

&lt;p&gt;When I first started learning Redux, I kept getting this nagging feeling — &lt;em&gt;have I seen this before?&lt;/em&gt; The Provider wrapping the app. The hook that reads state. The function that updates it. It all felt familiar in a way I couldn't place.&lt;/p&gt;

&lt;p&gt;Then it hit me. Context API. I'd learned this already. Just under a different name.&lt;/p&gt;

&lt;p&gt;And once I made that connection, Redux stopped feeling like a new language. It felt like an upgrade to one I already spoke.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Concepts Map Almost Perfectly
&lt;/h2&gt;

&lt;p&gt;Let me show you what I mean side by side.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Context API has &lt;code&gt;createContext&lt;/code&gt; — Redux has &lt;code&gt;createSlice&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In Context, you create a context object to hold a piece of state. In Redux, you create a slice. Both are you saying: &lt;em&gt;this is a dedicated space for this specific data.&lt;/em&gt; The slice just gives you more — built-in reducers, action creators, and cleaner organisation out of the box.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Both have a Provider. Literally.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This one made me laugh when I realised it. Context API uses &lt;code&gt;&amp;lt;MyContext.Provider&amp;gt;&lt;/code&gt;. Redux uses &lt;code&gt;&amp;lt;Provider store={store}&amp;gt;&lt;/code&gt;. You wrap your app. You pass in the data source. Every child gets access. The concept is identical — Redux just has one global Provider instead of one per context.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;useContext&lt;/code&gt; → &lt;code&gt;useSelector&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In Context, you call &lt;code&gt;useContext(MyContext)&lt;/code&gt; to read your state. In Redux, you call &lt;code&gt;useSelector((state) =&amp;gt; state.slice.value)&lt;/code&gt;. Both are hooks. Both read from a shared source. The difference is that &lt;code&gt;useSelector&lt;/code&gt; is more precise — you pick exactly which piece of state you need, which means your component only re-renders when &lt;em&gt;that specific piece&lt;/em&gt; changes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;setState&lt;/code&gt; / &lt;code&gt;useReducer&lt;/code&gt; dispatch → &lt;code&gt;useDispatch&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In Context, you either call a setter function or dispatch an action through &lt;code&gt;useReducer&lt;/code&gt;. In Redux, you call &lt;code&gt;useDispatch&lt;/code&gt; and fire an action. Same idea. You're telling the system: something happened, update accordingly.&lt;/p&gt;




&lt;h2&gt;
  
  
  So What's Actually Different?
&lt;/h2&gt;

&lt;p&gt;The concepts are the same. The difference is scale and control.&lt;/p&gt;

&lt;p&gt;Context API is lightweight and built into React. It's perfect for small to medium apps — things like theme toggling, auth state, language preference. It gets the job done without adding any dependencies.&lt;/p&gt;

&lt;p&gt;But when your app grows, Context starts to show cracks. Every time context value changes, every component consuming it re-renders — even if it only cares about one small part of the data. For a large app with complex, frequently-changing state, that becomes a performance problem.&lt;/p&gt;

&lt;p&gt;Redux was built for that scale. It gives you fine-grained subscriptions through &lt;code&gt;useSelector&lt;/code&gt;, a single organised store with clear structure, and DevTools that let you time-travel through every state change like a debugging superpower. It's more setup, but it earns its complexity.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Way I Think About It Now
&lt;/h2&gt;

&lt;p&gt;Context API is your local neighbourhood — quick, accessible, good for everyday things.&lt;/p&gt;

&lt;p&gt;Redux is the city infrastructure — more complex to build, but designed to handle real traffic.&lt;/p&gt;

&lt;p&gt;If Sanjana taught you Context API, you already understand the soul of Redux. You're not starting over. You're levelling up. The Provider is still a Provider. The hook that reads is still a hook that reads. The function that writes is still a function that writes.&lt;/p&gt;

&lt;p&gt;The vocabulary changed. The grammar didn't.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why This Realisation Matters
&lt;/h2&gt;

&lt;p&gt;Learning gets so much easier when you stop treating every new tool like it's foreign. Redux felt intimidating because I approached it like a stranger. The moment I saw it as Context API's bigger, more structured cousin — it opened up.&lt;/p&gt;

&lt;p&gt;That's the meta-lesson here. Concepts in programming repeat. They evolve. They get refined. But the underlying ideas stay consistent. The more you learn, the more you'll notice: it's never completely new. It's always a variation of something you already know.&lt;/p&gt;

&lt;p&gt;Keep connecting the dots. That's how this actually works.&lt;/p&gt;

</description>
      <category>react</category>
      <category>redux</category>
      <category>frontend</category>
      <category>webdev</category>
    </item>
    <item>
      <title>React Week 22: Mastering useEffect Rules, Closures, Performance Optimization &amp; Starting Redux</title>
      <dc:creator>Usama</dc:creator>
      <pubDate>Tue, 10 Mar 2026 16:11:07 +0000</pubDate>
      <link>https://forem.com/usama_dev/react-week-22-mastering-useeffect-rules-closures-performance-optimization-starting-redux-1978</link>
      <guid>https://forem.com/usama_dev/react-week-22-mastering-useeffect-rules-closures-performance-optimization-starting-redux-1978</guid>
      <description>&lt;p&gt;This week was mainly about &lt;strong&gt;understanding React behavior at a deeper level&lt;/strong&gt; and beginning my journey into &lt;strong&gt;Redux state management&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Instead of focusing on building large features, I spent most of my time studying &lt;strong&gt;how React works internally&lt;/strong&gt;, especially around &lt;strong&gt;effects, closures, and performance optimization&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;These concepts are not always visible in the UI, but they are extremely important for writing &lt;strong&gt;predictable and efficient React applications&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Understanding useEffect Rules and Best Practices
&lt;/h2&gt;

&lt;p&gt;One of my main goals this week was to improve my understanding of &lt;strong&gt;&lt;code&gt;useEffect&lt;/code&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Many developers (including myself earlier) tend to use &lt;code&gt;useEffect&lt;/code&gt; for almost everything. But after studying it more carefully, I realized that &lt;strong&gt;effects should be used only when necessary&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;I focused on learning the &lt;strong&gt;core rules and best practices&lt;/strong&gt;, such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Using &lt;code&gt;useEffect&lt;/code&gt; only for &lt;strong&gt;side effects&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Avoiding &lt;strong&gt;derived state inside effects&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Understanding the importance of &lt;strong&gt;dependency arrays&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Cleaning up effects properly when components re-render or unmount&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This helped me better understand &lt;strong&gt;when &lt;code&gt;useEffect&lt;/code&gt; should be used and when it should be avoided&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Understanding Closures Inside useEffect
&lt;/h2&gt;

&lt;p&gt;Another important concept I studied this week was &lt;strong&gt;closures inside &lt;code&gt;useEffect&lt;/code&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Closures can sometimes cause &lt;strong&gt;unexpected behavior&lt;/strong&gt;, especially when working with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;intervals&lt;/li&gt;
&lt;li&gt;timers&lt;/li&gt;
&lt;li&gt;asynchronous logic&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If the dependencies are not handled correctly, the effect might capture &lt;strong&gt;stale state values&lt;/strong&gt;, which can lead to bugs.&lt;/p&gt;

&lt;p&gt;Understanding this concept helped me see why dependency management in React is so important.&lt;/p&gt;




&lt;h2&gt;
  
  
  Performance Optimization Challenge
&lt;/h2&gt;

&lt;p&gt;This week I also worked on a &lt;strong&gt;performance optimization challenge&lt;/strong&gt; using a project called &lt;strong&gt;Workout Timer&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The goal of this challenge was not just to build the UI but to analyze &lt;strong&gt;how React components render and update&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;While working on this project, I practiced:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;analyzing unnecessary re-renders&lt;/li&gt;
&lt;li&gt;understanding how effects influence rendering&lt;/li&gt;
&lt;li&gt;structuring components more efficiently&lt;/li&gt;
&lt;li&gt;thinking about performance early in development&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This challenge helped me think more like a &lt;strong&gt;React developer who cares about performance&lt;/strong&gt;, not just functionality.&lt;/p&gt;




&lt;h2&gt;
  
  
  Starting My Redux Journey
&lt;/h2&gt;

&lt;p&gt;Another big milestone this week was &lt;strong&gt;starting to understand Redux&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;At first, Redux felt complex, but I quickly noticed that its core idea is &lt;strong&gt;very similar to React’s &lt;code&gt;useReducer&lt;/code&gt; hook&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The basic Redux flow includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;defining an &lt;strong&gt;initial state&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;creating a &lt;strong&gt;reducer function&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;creating a &lt;strong&gt;Redux store&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;dispatching &lt;strong&gt;actions&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;updating state through the reducer&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Understanding this structure helped me see how Redux manages &lt;strong&gt;global state across an application&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Learning About Redux Store and Action Creators
&lt;/h2&gt;

&lt;p&gt;I also began learning about:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Redux Store&lt;/strong&gt; – the central place where application state is stored&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Action Creator Functions&lt;/strong&gt; – helper functions that create action objects&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These concepts make state management more &lt;strong&gt;structured and predictable&lt;/strong&gt;, especially in larger applications.&lt;/p&gt;

&lt;p&gt;Although modern tools like &lt;strong&gt;Redux Toolkit&lt;/strong&gt; simplify Redux development, I focused on understanding the &lt;strong&gt;classic Redux flow first&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  What I Learned This Week
&lt;/h2&gt;

&lt;p&gt;Week 22 helped me improve my understanding of several important concepts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;useEffect&lt;/code&gt; rules and best practices&lt;/li&gt;
&lt;li&gt;closures inside React hooks&lt;/li&gt;
&lt;li&gt;performance optimization thinking&lt;/li&gt;
&lt;li&gt;Redux fundamentals&lt;/li&gt;
&lt;li&gt;Redux store and action creators&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These topics are more about &lt;strong&gt;understanding React deeply&lt;/strong&gt; rather than just building features.&lt;/p&gt;




&lt;h2&gt;
  
  
  Moving Forward
&lt;/h2&gt;

&lt;p&gt;Next, I plan to continue exploring:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Redux Toolkit&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;more &lt;strong&gt;performance optimization techniques&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;improving &lt;strong&gt;component architecture&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The goal is to gradually build a stronger foundation in &lt;strong&gt;React application architecture and state management&lt;/strong&gt;.&lt;/p&gt;




&lt;p&gt;Every week I try to focus not only on building projects but also on &lt;strong&gt;understanding the concepts that make React applications scalable and maintainable&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Step by step, the journey continues&lt;/p&gt;

</description>
      <category>react</category>
      <category>redux</category>
      <category>frontend</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Writing My First Redux Code — And Realizing How Similar It Is to useReducer</title>
      <dc:creator>Usama</dc:creator>
      <pubDate>Sun, 08 Mar 2026 12:56:06 +0000</pubDate>
      <link>https://forem.com/usama_dev/writing-my-first-redux-code-and-realizing-how-similar-it-is-to-usereducer-1hb9</link>
      <guid>https://forem.com/usama_dev/writing-my-first-redux-code-and-realizing-how-similar-it-is-to-usereducer-1hb9</guid>
      <description>&lt;p&gt;Yesterday I started exploring &lt;strong&gt;Redux&lt;/strong&gt; and one thing immediately stood out to me.&lt;/p&gt;

&lt;p&gt;Redux feels &lt;strong&gt;very similar to React’s &lt;code&gt;useReducer&lt;/code&gt; hook&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Yesterday I mostly observed and tried to understand the structure.&lt;br&gt;
But today I finally started &lt;strong&gt;writing my own Redux code&lt;/strong&gt;, and the similarities became even clearer.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 1: Creating the Initial State
&lt;/h2&gt;

&lt;p&gt;Just like &lt;code&gt;useReducer&lt;/code&gt;, the first thing we need in Redux is an &lt;strong&gt;initial state&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This initial state holds the starting values for our application.&lt;/p&gt;

&lt;p&gt;For example, it might contain things like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;account balance&lt;/li&gt;
&lt;li&gt;loan amount&lt;/li&gt;
&lt;li&gt;transaction history&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All the default values are defined here before any action changes the state.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 2: Writing the Reducer Function
&lt;/h2&gt;

&lt;p&gt;The next step is creating a &lt;strong&gt;reducer function&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This is also very similar to &lt;code&gt;useReducer&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The reducer receives two things:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;state&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;action&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Inside the reducer we usually use a &lt;strong&gt;switch statement&lt;/strong&gt; to handle different action types.&lt;/p&gt;

&lt;p&gt;Each case checks the &lt;strong&gt;action type&lt;/strong&gt;, and if needed it can also use the &lt;strong&gt;payload&lt;/strong&gt; to update the state.&lt;/p&gt;

&lt;p&gt;Something like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;deposit&lt;/li&gt;
&lt;li&gt;withdraw&lt;/li&gt;
&lt;li&gt;request loan&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Based on the action type, the reducer returns the &lt;strong&gt;next state&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 3: Creating the Redux Store
&lt;/h2&gt;

&lt;p&gt;Here is where Redux becomes a little different from &lt;code&gt;useReducer&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;In &lt;code&gt;useReducer&lt;/code&gt;, React manages everything inside the component.&lt;/p&gt;

&lt;p&gt;But in Redux, we need to create a &lt;strong&gt;central store&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This is done using the &lt;code&gt;createStore&lt;/code&gt; function that comes from Redux.&lt;/p&gt;

&lt;p&gt;The store holds the &lt;strong&gt;entire application state&lt;/strong&gt; and uses the reducer to update it.&lt;/p&gt;

&lt;p&gt;This is considered the &lt;strong&gt;classic or old Redux method&lt;/strong&gt;, but it is still important to understand it.&lt;/p&gt;

&lt;p&gt;For anyone learning Redux for the first time, understanding this flow is very useful.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 4: Dispatching Actions
&lt;/h2&gt;

&lt;p&gt;Once the store is created, we can &lt;strong&gt;dispatch actions&lt;/strong&gt; to update the state.&lt;/p&gt;

&lt;p&gt;Dispatching an action sends an object that contains:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a &lt;strong&gt;type&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;sometimes a &lt;strong&gt;payload&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The reducer receives this action and decides how the state should change.&lt;/p&gt;

&lt;p&gt;This flow looks like this:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Action → Dispatch → Reducer → New State&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  A More Advanced Way
&lt;/h2&gt;

&lt;p&gt;There are also more modern and advanced ways to use Redux.&lt;/p&gt;

&lt;p&gt;For example, developers often use &lt;strong&gt;action creator functions&lt;/strong&gt; to simplify dispatching actions.&lt;/p&gt;

&lt;p&gt;These helper functions make the code cleaner and easier to manage.&lt;/p&gt;

&lt;p&gt;However, for this blog I focused only on the &lt;strong&gt;basic Redux flow&lt;/strong&gt;, because understanding the fundamentals is more important at the beginning.&lt;/p&gt;




&lt;h2&gt;
  
  
  My Current Learning Progress
&lt;/h2&gt;

&lt;p&gt;Right now, I’m still at the stage of &lt;strong&gt;understanding the classic Redux structure&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;initial state&lt;/li&gt;
&lt;li&gt;reducer&lt;/li&gt;
&lt;li&gt;store&lt;/li&gt;
&lt;li&gt;dispatch&lt;/li&gt;
&lt;li&gt;actions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Even though modern tools like &lt;strong&gt;Redux Toolkit&lt;/strong&gt; simplify many of these steps, learning the original flow helps build a deeper understanding of how Redux works internally.&lt;/p&gt;




&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;Today was the first day I actually &lt;strong&gt;wrote Redux code myself&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;And the biggest realization was this:&lt;/p&gt;

&lt;p&gt;Redux is not completely new.&lt;/p&gt;

&lt;p&gt;If you already understand &lt;strong&gt;&lt;code&gt;useReducer&lt;/code&gt;&lt;/strong&gt;, Redux becomes much easier to understand because the core idea is very similar.&lt;/p&gt;

&lt;p&gt;The main difference is that Redux moves this logic &lt;strong&gt;outside the component and manages state globally&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;I’m still early in my Redux learning journey, but step by step the concepts are becoming clearer.&lt;/p&gt;

&lt;p&gt;More experiments coming soon 🚀&lt;/p&gt;

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