<?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: Srushti Patil</title>
    <description>The latest articles on DEV Community by Srushti Patil (@srushti).</description>
    <link>https://dev.to/srushti</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%2F3351134%2F929b6288-1488-4138-9e28-c220300458a5.png</url>
      <title>DEV Community: Srushti Patil</title>
      <link>https://dev.to/srushti</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/srushti"/>
    <language>en</language>
    <item>
      <title>[Boost]</title>
      <dc:creator>Srushti Patil</dc:creator>
      <pubDate>Mon, 18 Aug 2025 15:03:58 +0000</pubDate>
      <link>https://dev.to/srushti/-542d</link>
      <guid>https://dev.to/srushti/-542d</guid>
      <description>&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/srushti/prop-drilling-in-react-why-are-my-props-falling-through-the-floor-3745" class="crayons-story__hidden-navigation-link"&gt;🪜 Prop Drilling in React: Why Are My Props Falling Through the Floor?&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/srushti" class="crayons-avatar  crayons-avatar--l  "&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%2Fuser%2Fprofile_image%2F3351134%2F929b6288-1488-4138-9e28-c220300458a5.png" alt="srushti profile" class="crayons-avatar__image"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/srushti" class="crayons-story__secondary fw-medium m:hidden"&gt;
              Srushti Patil
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                Srushti Patil
                
              
              &lt;div id="story-author-preview-content-2741512" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/srushti" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&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%2Fuser%2Fprofile_image%2F3351134%2F929b6288-1488-4138-9e28-c220300458a5.png" class="crayons-avatar__image" alt=""&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;Srushti Patil&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/srushti/prop-drilling-in-react-why-are-my-props-falling-through-the-floor-3745" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Jul 30 '25&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/srushti/prop-drilling-in-react-why-are-my-props-falling-through-the-floor-3745" id="article-link-2741512"&gt;
          🪜 Prop Drilling in React: Why Are My Props Falling Through the Floor?
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/webdev"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;webdev&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/programming"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;programming&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/javascript"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;javascript&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/react"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;react&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
          &lt;a href="https://dev.to/srushti/prop-drilling-in-react-why-are-my-props-falling-through-the-floor-3745" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left"&gt;
            &lt;div class="multiple_reactions_aggregate"&gt;
              &lt;span class="multiple_reactions_icons_container"&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/sparkle-heart-5f9bee3767e18deb1bb725290cb151c25234768a0e9a2bd39370c382d02920cf.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
              &lt;/span&gt;
              &lt;span class="aggregate_reactions_counter"&gt;2&lt;span class="hidden s:inline"&gt; reactions&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/a&gt;
            &lt;a href="https://dev.to/srushti/prop-drilling-in-react-why-are-my-props-falling-through-the-floor-3745#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              Comments


              &lt;span class="hidden s:inline"&gt;Add Comment&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            3 min read
          &lt;/small&gt;
            
              &lt;span class="bm-initial"&gt;
                

              &lt;/span&gt;
              &lt;span class="bm-success"&gt;
                

              &lt;/span&gt;
            
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;


</description>
      <category>webdev</category>
      <category>programming</category>
      <category>javascript</category>
      <category>react</category>
    </item>
    <item>
      <title>🔍 React useEffect Demystified: A Beginner’s Guide</title>
      <dc:creator>Srushti Patil</dc:creator>
      <pubDate>Mon, 18 Aug 2025 13:38:52 +0000</pubDate>
      <link>https://dev.to/srushti/react-useeffect-demystified-a-beginners-guide-2n7e</link>
      <guid>https://dev.to/srushti/react-useeffect-demystified-a-beginners-guide-2n7e</guid>
      <description>&lt;p&gt;When you start with React, useState feels simple — it stores values and re-renders your component.&lt;br&gt;
But then comes useEffect… and suddenly, beginners ask:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;“Why is my code running twice?”&lt;/li&gt;
&lt;li&gt;“Why do I need cleanup?”&lt;/li&gt;
&lt;li&gt;“What’s this dependency array thing?”&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let’s break it down step by step with real-life analogies!&lt;/p&gt;



&lt;p&gt;&lt;strong&gt;🏠 What is a Side Effect?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In programming, a side effect is something that happens outside the main flow of your code.&lt;/p&gt;

&lt;p&gt;👉 Think of it like this:&lt;/p&gt;

&lt;p&gt;You enter your room → the light automatically turns on.&lt;/p&gt;

&lt;p&gt;You leave the room → the light turns off.&lt;/p&gt;

&lt;p&gt;The room is your component.&lt;br&gt;
The light is a side effect.&lt;br&gt;
It happens because of your presence, but it’s not the main job of being in the room.&lt;/p&gt;

&lt;p&gt;In React, these side effects could be:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Fetching data from an API&lt;/li&gt;
&lt;li&gt;Setting up event listeners&lt;/li&gt;
&lt;li&gt;Starting/stopping a timer&lt;/li&gt;
&lt;li&gt;Updating the document title&lt;/li&gt;
&lt;/ol&gt;



&lt;p&gt;&lt;strong&gt;⚡ Meet useEffect&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Here’s the syntax:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;useEffect(() =&amp;gt; {
  // side effect code here
  return () =&amp;gt; {
    // cleanup code here (optional)
  };
}, [dependencies]);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;The first function is what runs as the side effect.&lt;/li&gt;
&lt;li&gt;The return function is the cleanup (think of it as “turning off the light when you leave”).&lt;/li&gt;
&lt;li&gt;The [dependencies] array tells React when to run the effect.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;📦 Real-Life Example: Online Shopping&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You add a product to your cart → instantly, you get an order confirmation email.&lt;/p&gt;

&lt;p&gt;The cart = State&lt;br&gt;
The email = Side effect&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { useState, useEffect } from "react";

function Cart() {
  const [items, setItems] = useState([]);

  useEffect(() =&amp;gt; {
    console.log("📧 Sending confirmation email…");
  }, [items]); // runs whenever items change

  return (
    &amp;lt;div&amp;gt;
      &amp;lt;button onClick={() =&amp;gt; setItems([...items, "Shoe"])}&amp;gt;Add Shoe&amp;lt;/button&amp;gt;
      &amp;lt;p&amp;gt;Items: {items.join(", ")}&amp;lt;/p&amp;gt;
    &amp;lt;/div&amp;gt;
  );
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;&lt;strong&gt;🔄 Dependency Array in useEffect&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;🧃 Example 1: No Dependency Array → Runs on Every Render&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Imagine you open a fridge — every time you even peek inside, the fridge alarm beeps. Annoying, right?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;useEffect(() =&amp;gt; {
  console.log("Effect ran!");
});

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;📌 This runs every single render, which can cause unnecessary work.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;📦 Example 2: Empty Array [] → Runs Only Once&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Like a fridge alarm that only beeps once when you first open it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;useEffect(() =&amp;gt; {
  console.log("Effect ran only once (on mount).");
}, []);

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;📞 Example 3: With Dependencies [count] → Runs When Count Changes&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Think of it like a reminder that only triggers when a specific condition changes.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;useEffect(() =&amp;gt; {
  console.log("Effect ran because count changed:", count);
}, [count]);

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;📌 Effect re-runs only when the count changes.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;🧹 Why Cleanup Functions Matter&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Cleanup = “turning things off” before setting them up again.&lt;br&gt;
Without cleanup, you can end up with duplicate event listeners, memory leaks, or multiple timers running at once.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;🎵 Example 4: Timer Without Cleanup (Buggy)&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;useEffect(() =&amp;gt; {
  const interval = setInterval(() =&amp;gt; {
    console.log("⏰ Timer tick...");
  }, 1000);
}, [count]);

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every time the count changes, a new interval starts.&lt;br&gt;
Old intervals are never cleared → multiple timers run together → app lags.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;✅ Example 5: Timer With Cleanup (Correct)&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;useEffect(() =&amp;gt; {
  const interval = setInterval(() =&amp;gt; {
    console.log("⏰ Timer tick...");
  }, 1000);

  return () =&amp;gt; {
    clearInterval(interval); // cleanup old timer
    console.log("🧹 Timer cleaned up");
  };
}, [count]);

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;📌 Now, whenever the count changes:&lt;/p&gt;

&lt;p&gt;Old timer is cleared. The new timer starts fresh.&lt;br&gt;
Just like turning off the old alarm before setting a new one.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>react</category>
      <category>useeffect</category>
      <category>beginners</category>
    </item>
    <item>
      <title>[Boost]</title>
      <dc:creator>Srushti Patil</dc:creator>
      <pubDate>Mon, 18 Aug 2025 11:41:49 +0000</pubDate>
      <link>https://dev.to/srushti/-30lk</link>
      <guid>https://dev.to/srushti/-30lk</guid>
      <description>&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/srushti/react-to-do-app-a-beginners-thinking-guide-to-building-from-scratch-2478" class="crayons-story__hidden-navigation-link"&gt;✨ React To-Do App: A Beginner’s Thinking Guide to Building from Scratch&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/srushti" class="crayons-avatar  crayons-avatar--l  "&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%2Fuser%2Fprofile_image%2F3351134%2F929b6288-1488-4138-9e28-c220300458a5.png" alt="srushti profile" class="crayons-avatar__image"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/srushti" class="crayons-story__secondary fw-medium m:hidden"&gt;
              Srushti Patil
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                Srushti Patil
                
              
              &lt;div id="story-author-preview-content-2741430" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/srushti" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&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%2Fuser%2Fprofile_image%2F3351134%2F929b6288-1488-4138-9e28-c220300458a5.png" class="crayons-avatar__image" alt=""&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;Srushti Patil&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/srushti/react-to-do-app-a-beginners-thinking-guide-to-building-from-scratch-2478" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Aug 11 '25&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/srushti/react-to-do-app-a-beginners-thinking-guide-to-building-from-scratch-2478" id="article-link-2741430"&gt;
          ✨ React To-Do App: A Beginner’s Thinking Guide to Building from Scratch
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/react"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;react&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/beginners"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;beginners&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/javascript"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;javascript&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/webdev"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;webdev&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
          &lt;a href="https://dev.to/srushti/react-to-do-app-a-beginners-thinking-guide-to-building-from-scratch-2478" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left"&gt;
            &lt;div class="multiple_reactions_aggregate"&gt;
              &lt;span class="multiple_reactions_icons_container"&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/sparkle-heart-5f9bee3767e18deb1bb725290cb151c25234768a0e9a2bd39370c382d02920cf.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
              &lt;/span&gt;
              &lt;span class="aggregate_reactions_counter"&gt;1&lt;span class="hidden s:inline"&gt; reaction&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/a&gt;
            &lt;a href="https://dev.to/srushti/react-to-do-app-a-beginners-thinking-guide-to-building-from-scratch-2478#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              Comments


              &lt;span class="hidden s:inline"&gt;Add Comment&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            3 min read
          &lt;/small&gt;
            
              &lt;span class="bm-initial"&gt;
                

              &lt;/span&gt;
              &lt;span class="bm-success"&gt;
                

              &lt;/span&gt;
            
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;


</description>
      <category>react</category>
      <category>beginners</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>✨ React To-Do App: A Beginner’s Thinking Guide to Building from Scratch</title>
      <dc:creator>Srushti Patil</dc:creator>
      <pubDate>Mon, 11 Aug 2025 16:08:27 +0000</pubDate>
      <link>https://dev.to/srushti/react-to-do-app-a-beginners-thinking-guide-to-building-from-scratch-2478</link>
      <guid>https://dev.to/srushti/react-to-do-app-a-beginners-thinking-guide-to-building-from-scratch-2478</guid>
      <description>&lt;p&gt;&lt;code&gt;“How do I even start building something in React?”&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;If you've asked yourself that question, you’re not alone. React can feel intimidating at first, but when you break it down one thought at a time, it becomes a superpower.&lt;/p&gt;

&lt;p&gt;Let’s walk through building a To-Do App — not just the code, but the thinking process behind every line. This blog isn’t about copy-pasting; it’s about helping you develop a builder’s mindset.&lt;/p&gt;




&lt;p&gt;🧠 &lt;strong&gt;Step 1: Think in Components&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;"What am I building?"&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
A To-Do App is a perfect starter project because it helps you practice:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Displaying a list&lt;/li&gt;
&lt;li&gt;Adding new items&lt;/li&gt;
&lt;li&gt;Updating item state (like marking it done)&lt;/li&gt;
&lt;li&gt;Removing items&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;So let’s break it into components:&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;App: The heart that holds everything.&lt;/li&gt;
&lt;li&gt;TodoList: Displays the list of items.&lt;/li&gt;
&lt;li&gt;TodoItem: Represents one task.&lt;/li&gt;
&lt;/ul&gt;



&lt;p&gt;⚙️ &lt;strong&gt;Step 2: Set Up the Project&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We’re using Vite for a fast and modern React setup.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm create vite@latest react-todo-app -- --template react
cd react-todo-app
npm install
npm run dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open src/App.jsx — that’s where your app lives.&lt;/p&gt;




&lt;p&gt;📦 &lt;strong&gt;Step 3: Start from the Middle — The App.jsx&lt;/strong&gt;&lt;br&gt;
When I build something new, I don’t write everything at once. I start with what I understand best — in this case, managing the list of todos.&lt;/p&gt;

&lt;p&gt;Here’s the code (with thought bubbles):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { useState } from 'react';
import TodoList from './components/TodoList';

function App() {
  const [todos, setTodos] = useState([]); // 🧠 The to-do list
  const [text, setText] = useState('');   // ✍️ What the user is typing

  const addTodo = (e) =&amp;gt; {
  e.preventDefault(); // ⛔ Prevent page refresh when form is submitted
  if (text.trim()) {
    const newTodo = {
      id: Date.now(),        // Unique ID using current timestamp
      text,                  // The text the user typed
      completed: false       // New tasks are not completed by default
    };
    setTodos([...todos, newTodo]); // ✅ Add the new task to the existing list
    setText('');                   // 🔄 Clear input field
  }
};


  // Toggle completion
  const toggleComplete = (id) =&amp;gt; {
    setTodos(todos.map(todo =&amp;gt;
      todo.id === id ? { ...todo, completed: !todo.completed } : todo
    ));
  };

  // Delete a task
  const deleteTodo = (id) =&amp;gt; {
    setTodos(todos.filter(todo =&amp;gt; todo.id !== id));
  };

  return (
    &amp;lt;div&amp;gt;
      &amp;lt;h1&amp;gt;React To-Do App&amp;lt;/h1&amp;gt;

      {/* 🧠 Add a task */}
      &amp;lt;form onSubmit={addTodo}&amp;gt;
        &amp;lt;input
          type="text"
          value={text}
          placeholder="Add a new task"
          onChange={(e) =&amp;gt; setText(e.target.value)}
        /&amp;gt;
        &amp;lt;button type="submit"&amp;gt;Add&amp;lt;/button&amp;gt;
      &amp;lt;/form&amp;gt;

      {/* 🧠 Show the list */}
      &amp;lt;TodoList
        todos={todos}
        onToggle={toggleComplete}
        onDelete={deleteTodo}
      /&amp;gt;
    &amp;lt;/div&amp;gt;
  );
}

export default App;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🔍 &lt;strong&gt;What’s happening:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The form is submitted → The addTodo function is called.&lt;/li&gt;
&lt;li&gt;If there's something typed (text.trim()), it creates a new todo object.&lt;/li&gt;
&lt;li&gt;The new task is added to the existing todos array using the spread operator.&lt;/li&gt;
&lt;li&gt;setText('') clears the input so the user can type the next task.&lt;/li&gt;
&lt;li&gt;Every task has a unique ID.&lt;/li&gt;
&lt;li&gt;In deleteTodo → filter() creates a new array excluding the task with the matching ID.&lt;/li&gt;
&lt;li&gt;The new filtered array is set back into the state using setTodos().&lt;/li&gt;
&lt;li&gt;map() goes through all tasks.&lt;/li&gt;
&lt;li&gt;In toggleComplete  → when it finds the one with the matching ID, it flips the value of completed.&lt;/li&gt;
&lt;li&gt;The ...todo keeps everything else the same, only changing completed.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;🔄 &lt;strong&gt;Step 4: Build TodoList &amp;amp; TodoItem&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Why separate them?&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Because every task can be reused, styled, or enhanced on its own. Keeping things modular = clean code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;TodoList.jsx&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import TodoItem from './TodoItem';

function TodoList({ todos, onToggle, onDelete }) {
  return (
    &amp;lt;ul&amp;gt;
      {todos.map(todo =&amp;gt; (
        &amp;lt;TodoItem
          key={todo.id}
          todo={todo}
          onToggle={onToggle}
          onDelete={onDelete}
        /&amp;gt;
      ))}
    &amp;lt;/ul&amp;gt;
  );
}

export default TodoList;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;em&gt;TodoItem.jsx&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function TodoItem({ todo, onToggle, onDelete }) {
  return (
    &amp;lt;li&amp;gt;
      &amp;lt;span
        onClick={() =&amp;gt; onToggle(todo.id)}
        style={{
          textDecoration: todo.completed ? 'line-through' : 'none',
          cursor: 'pointer',
          marginRight: '10px'
        }}
      &amp;gt;
        {todo.text}
      &amp;lt;/span&amp;gt;
      &amp;lt;button onClick={() =&amp;gt; onDelete(todo.id)}&amp;gt;❌&amp;lt;/button&amp;gt;
    &amp;lt;/li&amp;gt;
  );
}

export default TodoItem;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;🧩 &lt;strong&gt;Step 5: Test the Flow (and Think Like the User)&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Can I add a task?&lt;/li&gt;
&lt;li&gt;Can I mark it as done?&lt;/li&gt;
&lt;li&gt;Can I delete it?&lt;/li&gt;
&lt;li&gt;Does the app feel responsive and logical?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;*&lt;em&gt;If yes, congrats! You’ve just built your first real React app *&lt;/em&gt;🎉&lt;/p&gt;




&lt;p&gt;🌱 &lt;strong&gt;Thought-Driven Dev Tips&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Don’t start with a blank screen — start with what makes sense to you.&lt;/li&gt;
&lt;li&gt;Build piece by piece. Get one feature working before adding the next.&lt;/li&gt;
&lt;li&gt;Keep asking: "What should happen when the user clicks here?"&lt;/li&gt;
&lt;li&gt;Think in state: “What changes in the app when I do something?”&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>react</category>
      <category>beginners</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>[Boost]</title>
      <dc:creator>Srushti Patil</dc:creator>
      <pubDate>Mon, 11 Aug 2025 16:07:45 +0000</pubDate>
      <link>https://dev.to/srushti/-4o3m</link>
      <guid>https://dev.to/srushti/-4o3m</guid>
      <description>&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/srushti/prop-drilling-in-react-why-are-my-props-falling-through-the-floor-3745" class="crayons-story__hidden-navigation-link"&gt;🪜 Prop Drilling in React: Why Are My Props Falling Through the Floor?&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/srushti" class="crayons-avatar  crayons-avatar--l  "&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%2Fuser%2Fprofile_image%2F3351134%2F929b6288-1488-4138-9e28-c220300458a5.png" alt="srushti profile" class="crayons-avatar__image"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/srushti" class="crayons-story__secondary fw-medium m:hidden"&gt;
              Srushti Patil
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                Srushti Patil
                
              
              &lt;div id="story-author-preview-content-2741512" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/srushti" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&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%2Fuser%2Fprofile_image%2F3351134%2F929b6288-1488-4138-9e28-c220300458a5.png" class="crayons-avatar__image" alt=""&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;Srushti Patil&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/srushti/prop-drilling-in-react-why-are-my-props-falling-through-the-floor-3745" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Jul 30 '25&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/srushti/prop-drilling-in-react-why-are-my-props-falling-through-the-floor-3745" id="article-link-2741512"&gt;
          🪜 Prop Drilling in React: Why Are My Props Falling Through the Floor?
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/webdev"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;webdev&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/programming"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;programming&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/javascript"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;javascript&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/react"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;react&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
          &lt;a href="https://dev.to/srushti/prop-drilling-in-react-why-are-my-props-falling-through-the-floor-3745" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left"&gt;
            &lt;div class="multiple_reactions_aggregate"&gt;
              &lt;span class="multiple_reactions_icons_container"&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/sparkle-heart-5f9bee3767e18deb1bb725290cb151c25234768a0e9a2bd39370c382d02920cf.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
              &lt;/span&gt;
              &lt;span class="aggregate_reactions_counter"&gt;2&lt;span class="hidden s:inline"&gt; reactions&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/a&gt;
            &lt;a href="https://dev.to/srushti/prop-drilling-in-react-why-are-my-props-falling-through-the-floor-3745#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              Comments


              &lt;span class="hidden s:inline"&gt;Add Comment&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            3 min read
          &lt;/small&gt;
            
              &lt;span class="bm-initial"&gt;
                

              &lt;/span&gt;
              &lt;span class="bm-success"&gt;
                

              &lt;/span&gt;
            
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;


</description>
      <category>webdev</category>
      <category>programming</category>
      <category>javascript</category>
      <category>react</category>
    </item>
    <item>
      <title>🪜 Prop Drilling in React: Why Are My Props Falling Through the Floor?</title>
      <dc:creator>Srushti Patil</dc:creator>
      <pubDate>Wed, 30 Jul 2025 09:50:25 +0000</pubDate>
      <link>https://dev.to/srushti/prop-drilling-in-react-why-are-my-props-falling-through-the-floor-3745</link>
      <guid>https://dev.to/srushti/prop-drilling-in-react-why-are-my-props-falling-through-the-floor-3745</guid>
      <description>&lt;p&gt;🫣 Excited to Build Your First React Component — A To-Do App?&lt;br&gt;
But wait✋… there's something important you need to understand first:&lt;/p&gt;

&lt;p&gt;Before diving into buttons, inputs, and that shiny “Add Task” feature, let’s talk about a concept you’ll definitely run into while building even the simplest React apps — especially a To-Do List.&lt;/p&gt;

&lt;p&gt;It’s called prop drilling.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🧠 What’s That?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;when you're starting with React, you quickly meet a concept that feels simple at first — passing data using props.&lt;/p&gt;

&lt;p&gt;But then… you start passing props from one component → to another → to another → and before you know it, you're "prop drilling" and your app feels like a game of Chinese whispers.&lt;/p&gt;

&lt;p&gt;Let’s break down what prop drilling is, why it can be a problem, and how you can handle it like a pro (without losing your cool).&lt;/p&gt;



&lt;p&gt;🧠 &lt;strong&gt;First, What Are Props?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Props (short for “properties”) are how components in React talk to each other.&lt;/p&gt;

&lt;p&gt;For example: You’re passing the name prop to the Greeting component. Simple, right?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function Greeting({ name }) {
  return &amp;lt;h1&amp;gt;Hello, {name}!&amp;lt;/h1&amp;gt;;
}

&amp;lt;Greeting name="Srushti" /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;🚪 &lt;strong&gt;Now Enter: Prop Drilling&lt;/strong&gt;&lt;br&gt;
Let’s say you have a component hierarchy like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;App
└── Parent
    └── Child
        └── GrandChild
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And you want to pass some data from the App to the GrandChild.&lt;/p&gt;

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

&lt;ol&gt;
&lt;li&gt;App passes props to Parent&lt;/li&gt;
&lt;li&gt;Parent passes it to the Child&lt;/li&gt;
&lt;li&gt;Child passes it to GrandChild&lt;/li&gt;
&lt;li&gt;Even if Parent and Child don’t care about that data, they're just the middlemen.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That’s prop drilling: passing data through components that don’t need it, just so it can reach the one that does.&lt;/p&gt;




&lt;p&gt;📦 Code Example: &lt;em&gt;Prop Drilling in Action&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function App() {
  const user = "Srushti";
  return &amp;lt;Parent user={user} /&amp;gt;;
}

function Parent({ user }) {
  return &amp;lt;Child user={user} /&amp;gt;;
}

function Child({ user }) {
  return &amp;lt;GrandChild user={user} /&amp;gt;;
}

function GrandChild({ user }) {
  return &amp;lt;h2&amp;gt;Hello from GrandChild, {user}!&amp;lt;/h2&amp;gt;;
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🤔 &lt;strong&gt;Why Is Prop Drilling a Problem?&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Components get bloated with props they don’t even use&lt;/li&gt;
&lt;li&gt;It’s harder to refactor or reorganize your UI&lt;/li&gt;
&lt;li&gt;Debugging becomes confusing — you lose track of where the data is coming from&lt;/li&gt;
&lt;li&gt;It breaks the separation of concerns — components become too tightly coupled&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;🧯&lt;strong&gt;So How Do We Fix It?&lt;/strong&gt;&lt;br&gt;
React gives us tools to avoid prop drilling when it gets annoying:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;em&gt;Context API (built-in solution)&lt;/em&gt;
You can create a global-ish state and share it with any component — no need to pass props step-by-step.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const UserContext = createContext();

function App() {
  return (
    &amp;lt;UserContext.Provider value="Srushti"&amp;gt;
      &amp;lt;Parent /&amp;gt;
    &amp;lt;/UserContext.Provider&amp;gt;
  );
}

function GrandChild() {
  const user = useContext(UserContext);
  return &amp;lt;h2&amp;gt;Hello {user}!&amp;lt;/h2&amp;gt;;
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;✅ Only the component that needs the value uses it. No middleman components needed.&lt;/p&gt;




&lt;p&gt;🧼 &lt;strong&gt;When Is Prop Drilling Okay?&lt;/strong&gt;&lt;br&gt;
Sometimes, prop drilling is fine, especially in small apps or for a few levels. Don’t over-engineer.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;You’re passing the same prop through 3+ components&lt;/li&gt;
&lt;li&gt;Or your UI is deeply nested&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;👉 It’s time to consider Context or state management libraries like Redux, Zustand, or React Query.&lt;/p&gt;




&lt;p&gt;🎯 &lt;strong&gt;Final Thoughts&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Prop drilling is a common growing pain in React. It means you’re building something big enough to care about component communication — that’s a good thing.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Props are great for clear, direct communication&lt;/li&gt;
&lt;li&gt;Context is great for global, indirect communication&lt;/li&gt;
&lt;li&gt;Know when to drill, and when to chill 🧊&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>javascript</category>
      <category>react</category>
    </item>
    <item>
      <title>🧠 State of Mind: React useState Made Simple — Part 2</title>
      <dc:creator>Srushti Patil</dc:creator>
      <pubDate>Sun, 27 Jul 2025 15:09:06 +0000</pubDate>
      <link>https://dev.to/srushti/state-of-mind-react-usestate-made-simple-part-2-5g1a</link>
      <guid>https://dev.to/srushti/state-of-mind-react-usestate-made-simple-part-2-5g1a</guid>
      <description>&lt;p&gt;Welcome back, React explorer! 🚀&lt;br&gt;
In &lt;/p&gt;
&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/srushti/state-of-mind-react-usestate-made-simple-part-1-4j73" class="crayons-story__hidden-navigation-link"&gt;State of Mind: React useState Made Simple - Part 1&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/srushti" class="crayons-avatar  crayons-avatar--l  "&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%2Fuser%2Fprofile_image%2F3351134%2F929b6288-1488-4138-9e28-c220300458a5.png" alt="srushti profile" class="crayons-avatar__image"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/srushti" class="crayons-story__secondary fw-medium m:hidden"&gt;
              Srushti Patil
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                Srushti Patil
                
              
              &lt;div id="story-author-preview-content-2707330" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/srushti" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&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%2Fuser%2Fprofile_image%2F3351134%2F929b6288-1488-4138-9e28-c220300458a5.png" class="crayons-avatar__image" alt=""&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;Srushti Patil&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/srushti/state-of-mind-react-usestate-made-simple-part-1-4j73" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Jul 20 '25&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/srushti/state-of-mind-react-usestate-made-simple-part-1-4j73" id="article-link-2707330"&gt;
          State of Mind: React useState Made Simple - Part 1
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/react"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;react&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/webdev"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;webdev&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/programming"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;programming&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/beginners"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;beginners&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
          &lt;a href="https://dev.to/srushti/state-of-mind-react-usestate-made-simple-part-1-4j73" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left"&gt;
            &lt;div class="multiple_reactions_aggregate"&gt;
              &lt;span class="multiple_reactions_icons_container"&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/exploding-head-daceb38d627e6ae9b730f36a1e390fca556a4289d5a41abb2c35068ad3e2c4b5.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/multi-unicorn-b44d6f8c23cdd00964192bedc38af3e82463978aa611b4365bd33a0f1f4f3e97.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/sparkle-heart-5f9bee3767e18deb1bb725290cb151c25234768a0e9a2bd39370c382d02920cf.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
              &lt;/span&gt;
              &lt;span class="aggregate_reactions_counter"&gt;5&lt;span class="hidden s:inline"&gt; reactions&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/a&gt;
            &lt;a href="https://dev.to/srushti/state-of-mind-react-usestate-made-simple-part-1-4j73#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              Comments


              1&lt;span class="hidden s:inline"&gt; comment&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            2 min read
          &lt;/small&gt;
            
              &lt;span class="bm-initial"&gt;
                

              &lt;/span&gt;
              &lt;span class="bm-success"&gt;
                

              &lt;/span&gt;
            
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;
, we cracked open the treasure chest called useState and took a peek at its shiny gems. You now know how to declare, update, and render simple state. But hey—React’s state is more than just counters and toggles.

&lt;p&gt;&lt;em&gt;Let’s level up your state game in Part 2! 🎮&lt;/em&gt;&lt;br&gt;
We’ll cover some “real-world” scenarios, common mistakes, and a fun mini-project. Ready? Let’s dive in.&lt;/p&gt;



&lt;p&gt;🌱 &lt;strong&gt;1. Multiple Pieces of State? No Problem!&lt;/strong&gt;&lt;br&gt;
React lets you track multiple independent values using useState. Think of it like having multiple notepads instead of stuffing everything into one page.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const [name, setName] = useState('');
const [age, setAge] = useState('');

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each useState is totally independent — they won’t interfere with each other. Use this when your variables don’t need to be bundled.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;🧠 Tip: Name your state and setters clearly. It makes debugging 100x easier.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;🔁2. When Your Update Depends on the Previous Value&lt;/strong&gt;&lt;br&gt;
Let’s say you have a counter. You click a button twice really fast:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;setCount(count + 1);
setCount(count + 1);

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Surprise! It only increases by 1 😱&lt;/p&gt;

&lt;p&gt;Why? Because setState is asynchronous and React batches updates for performance.&lt;/p&gt;

&lt;p&gt;Fix it with the function form:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;setCount(prevCount =&amp;gt; prevCount + 1);

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🧼 &lt;strong&gt;3. Don't Mutate the State Directly 🙅‍♀️&lt;/strong&gt;&lt;br&gt;
Tempting, right?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;user.name = 'Bob';
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;🚨 Big No-No. React won’t notice the change and won’t re-render.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Instead, create a new version of the object or array:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;setUser(prev =&amp;gt; ({ ...prev, name: 'Bob' }));
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Same for arrays:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;setTasks(prev =&amp;gt; [...prev, newTask]);

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;⏳ 4. State Updates Are Not Instant&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Let’s say you do this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;setName('Bob');
console.log(name); // Still prints the old name
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;That’s because useState updates the state after the component re-renders. The new value will be there on the next render.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;🔄 Always think in terms of next render, not next line.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;📦 &lt;strong&gt;5. Storing Objects &amp;amp; Arrays in State&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You’re not limited to strings and numbers!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const [user, setUser] = useState({ name: '', age: 0 });
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When updating:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
setUser(prev =&amp;gt; ({
  ...prev,
  name: 'React Learner',
}));

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Arrays? Same deal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const [tasks, setTasks] = useState([]);
setTasks(prev =&amp;gt; [...prev, 'Learn React']);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;&lt;code&gt;Always copy the previous state to keep things immutable.&lt;/code&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;⚠️ &lt;strong&gt;6. Common Mistakes Beginners Make&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;❌** Mistake   **&lt;br&gt;
Directly modifying state (e.g., stateVar = newValue)&lt;br&gt;&lt;br&gt;
Reading updated state right after calling setState&lt;br&gt;&lt;br&gt;
Forgetting to spread objects/arrays &lt;br&gt;
Not using function form for prev-dependent updates&lt;/p&gt;

&lt;p&gt;✅** Instead Do**&lt;br&gt;
Use the setter (setState)&lt;br&gt;
Wait for the next render&lt;br&gt;
Use ...prevState to copy&lt;br&gt;
Use setCount(prev =&amp;gt; prev + 1)&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;👀 Up Next in Part 3...&lt;/strong&gt;&lt;br&gt;
In Part 3, we’re rolling up our sleeves to build something real — a simple To-Do App 📝.&lt;br&gt;
We’ll also learn how to pass state around, split components, and build a tiny app that teaches big React lessons.&lt;/p&gt;

&lt;p&gt;Ready to turn your knowledge into something interactive?&lt;br&gt;
_&lt;br&gt;
👉 See you in Part 3!_&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>javascript</category>
      <category>react</category>
    </item>
    <item>
      <title>[Boost]</title>
      <dc:creator>Srushti Patil</dc:creator>
      <pubDate>Sun, 27 Jul 2025 13:59:29 +0000</pubDate>
      <link>https://dev.to/srushti/-1c11</link>
      <guid>https://dev.to/srushti/-1c11</guid>
      <description>&lt;div class="ltag__link"&gt;
  &lt;a href="/srushti" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&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%2Fuser%2Fprofile_image%2F3351134%2F929b6288-1488-4138-9e28-c220300458a5.png" alt="srushti"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="https://dev.to/srushti/jsx-is-not-html-and-thats-okay--kl" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;JSX is NOT HTML (And That’s Okay 😌)&lt;/h2&gt;
      &lt;h3&gt;Srushti Patil ・ Jul 14&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#webdev&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#beginners&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#react&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#jsx&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>react</category>
      <category>jsx</category>
    </item>
    <item>
      <title>[Boost]</title>
      <dc:creator>Srushti Patil</dc:creator>
      <pubDate>Sun, 20 Jul 2025 08:58:21 +0000</pubDate>
      <link>https://dev.to/srushti/-1285</link>
      <guid>https://dev.to/srushti/-1285</guid>
      <description>&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/srushti/state-of-mind-react-usestate-made-simple-part-1-4j73" class="crayons-story__hidden-navigation-link"&gt;State of Mind: React useState Made Simple - Part 1&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/srushti" class="crayons-avatar  crayons-avatar--l  "&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%2Fuser%2Fprofile_image%2F3351134%2F929b6288-1488-4138-9e28-c220300458a5.png" alt="srushti profile" class="crayons-avatar__image"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/srushti" class="crayons-story__secondary fw-medium m:hidden"&gt;
              Srushti Patil
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                Srushti Patil
                
              
              &lt;div id="story-author-preview-content-2707330" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/srushti" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&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%2Fuser%2Fprofile_image%2F3351134%2F929b6288-1488-4138-9e28-c220300458a5.png" class="crayons-avatar__image" alt=""&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;Srushti Patil&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/srushti/state-of-mind-react-usestate-made-simple-part-1-4j73" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Jul 20 '25&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/srushti/state-of-mind-react-usestate-made-simple-part-1-4j73" id="article-link-2707330"&gt;
          State of Mind: React useState Made Simple - Part 1
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/react"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;react&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/webdev"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;webdev&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/programming"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;programming&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/beginners"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;beginners&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
          &lt;a href="https://dev.to/srushti/state-of-mind-react-usestate-made-simple-part-1-4j73" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left"&gt;
            &lt;div class="multiple_reactions_aggregate"&gt;
              &lt;span class="multiple_reactions_icons_container"&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/exploding-head-daceb38d627e6ae9b730f36a1e390fca556a4289d5a41abb2c35068ad3e2c4b5.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/multi-unicorn-b44d6f8c23cdd00964192bedc38af3e82463978aa611b4365bd33a0f1f4f3e97.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/sparkle-heart-5f9bee3767e18deb1bb725290cb151c25234768a0e9a2bd39370c382d02920cf.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
              &lt;/span&gt;
              &lt;span class="aggregate_reactions_counter"&gt;5&lt;span class="hidden s:inline"&gt; reactions&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/a&gt;
            &lt;a href="https://dev.to/srushti/state-of-mind-react-usestate-made-simple-part-1-4j73#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              Comments


              1&lt;span class="hidden s:inline"&gt; comment&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            2 min read
          &lt;/small&gt;
            
              &lt;span class="bm-initial"&gt;
                

              &lt;/span&gt;
              &lt;span class="bm-success"&gt;
                

              &lt;/span&gt;
            
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;


</description>
      <category>react</category>
      <category>webdev</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
    <item>
      <title>State of Mind: React useState Made Simple - Part 1</title>
      <dc:creator>Srushti Patil</dc:creator>
      <pubDate>Sun, 20 Jul 2025 02:12:56 +0000</pubDate>
      <link>https://dev.to/srushti/state-of-mind-react-usestate-made-simple-part-1-4j73</link>
      <guid>https://dev.to/srushti/state-of-mind-react-usestate-made-simple-part-1-4j73</guid>
      <description>&lt;h2&gt;
  
  
  Part 1: What is State? And Why Should I Care?
&lt;/h2&gt;

&lt;p&gt;When you're building an interactive app with React, you want your components to remember stuff.&lt;/p&gt;

&lt;p&gt;But React doesn’t just magically remember things like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Whether a button was clicked&lt;/li&gt;
&lt;li&gt;What the user typed into a field&lt;/li&gt;
&lt;li&gt;If a modal is open or closed&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That’s where state comes in.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;🤔 What Is “State”?&lt;/strong&gt;&lt;br&gt;
Think of the state like your app’s memory.&lt;br&gt;
React provides a way to store values within a component that change over time.&lt;/p&gt;

&lt;p&gt;📦 &lt;em&gt;It’s like a mini storage unit inside your component — and when you change what’s inside, React updates the UI automatically!&lt;/em&gt;&lt;/p&gt;



&lt;p&gt;&lt;strong&gt;🧠 Real-World Analogy: Mood Ring&lt;/strong&gt;&lt;br&gt;
Imagine a React component is like a mood ring.&lt;br&gt;
_&lt;br&gt;
If you're happy, it turns green&lt;/p&gt;

&lt;p&gt;If you're sad, it turns blue&lt;/p&gt;

&lt;p&gt;If you're excited, it glows purple_&lt;/p&gt;

&lt;p&gt;Your mood is the state — it changes based on how you're feeling, and the ring (UI) reacts to it. &lt;/p&gt;



&lt;p&gt;&lt;strong&gt;🧩 Enter useState()&lt;/strong&gt;&lt;br&gt;
To give our component a memory, we use a React Hook called useState.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React, { useState } from 'react';

function MoodRing() {
  const [mood, setMood] = useState('😊');

  return (
    &amp;lt;div&amp;gt;
      &amp;lt;h2&amp;gt;Your mood: {mood}&amp;lt;/h2&amp;gt;
      &amp;lt;button onClick={() =&amp;gt; setMood('😢')}&amp;gt;Sad&amp;lt;/button&amp;gt;
      &amp;lt;button onClick={() =&amp;gt; setMood('😄')}&amp;gt;Happy&amp;lt;/button&amp;gt;
    &amp;lt;/div&amp;gt;
  );
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;👀 What’s Happening Here?&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const [mood, setMood] = useState('😊');

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You're telling React:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"Hey, I need a piece of memory called mood"&lt;/li&gt;
&lt;li&gt;"Set it initially to 😊"&lt;/li&gt;
&lt;li&gt;"Give me a function setMood to change it"&lt;/li&gt;
&lt;li&gt;When setMood is called, React updates the value of mood&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Re-renders the component with the new mood&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;🧪 Beginner Tip: Always Use setState&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;You shouldn’t modify state variables directly:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mood = '😡'; // ❌ Wrong!
setMood('😡'); // ✅ Correct!

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Why? Because React won’t know something changed unless you use the setter function (setMood). That’s how React knows it needs to update the UI.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;📌 Coming Up in Part 2...&lt;/strong&gt;&lt;br&gt;
Now that you know what state is, in the next part we’ll explore:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Multiple useState calls&lt;/li&gt;
&lt;li&gt;Storing objects/arrays&lt;/li&gt;
&lt;li&gt;Best practices and common mistakes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Stay tuned for:&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;👉 “Part 2: Don’t Be Shy, useState All the Things!”&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>react</category>
      <category>webdev</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
    <item>
      <title>[Boost]</title>
      <dc:creator>Srushti Patil</dc:creator>
      <pubDate>Sun, 20 Jul 2025 01:57:31 +0000</pubDate>
      <link>https://dev.to/srushti/-86c</link>
      <guid>https://dev.to/srushti/-86c</guid>
      <description>&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/srushti/react-for-absolute-beginners-what-the-heck-is-a-component-56bg" class="crayons-story__hidden-navigation-link"&gt;🚀 React for Absolute Beginners: What the Heck Is a Component?&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/srushti" class="crayons-avatar  crayons-avatar--l  "&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%2Fuser%2Fprofile_image%2F3351134%2F929b6288-1488-4138-9e28-c220300458a5.png" alt="srushti profile" class="crayons-avatar__image"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/srushti" class="crayons-story__secondary fw-medium m:hidden"&gt;
              Srushti Patil
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                Srushti Patil
                
              
              &lt;div id="story-author-preview-content-2684095" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/srushti" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&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%2Fuser%2Fprofile_image%2F3351134%2F929b6288-1488-4138-9e28-c220300458a5.png" class="crayons-avatar__image" alt=""&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;Srushti Patil&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/srushti/react-for-absolute-beginners-what-the-heck-is-a-component-56bg" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Jul 13 '25&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/srushti/react-for-absolute-beginners-what-the-heck-is-a-component-56bg" id="article-link-2684095"&gt;
          🚀 React for Absolute Beginners: What the Heck Is a Component?
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/react"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;react&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/webdev"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;webdev&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/beginners"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;beginners&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/javascript"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;javascript&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
          &lt;a href="https://dev.to/srushti/react-for-absolute-beginners-what-the-heck-is-a-component-56bg" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left"&gt;
            &lt;div class="multiple_reactions_aggregate"&gt;
              &lt;span class="multiple_reactions_icons_container"&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/fire-f60e7a582391810302117f987b22a8ef04a2fe0df7e3258a5f49332df1cec71e.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/raised-hands-74b2099fd66a39f2d7eed9305ee0f4553df0eb7b4f11b01b6b1b499973048fe5.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/sparkle-heart-5f9bee3767e18deb1bb725290cb151c25234768a0e9a2bd39370c382d02920cf.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
              &lt;/span&gt;
              &lt;span class="aggregate_reactions_counter"&gt;14&lt;span class="hidden s:inline"&gt; reactions&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/a&gt;
            &lt;a href="https://dev.to/srushti/react-for-absolute-beginners-what-the-heck-is-a-component-56bg#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              Comments


              7&lt;span class="hidden s:inline"&gt; comments&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            1 min read
          &lt;/small&gt;
            
              &lt;span class="bm-initial"&gt;
                

              &lt;/span&gt;
              &lt;span class="bm-success"&gt;
                

              &lt;/span&gt;
            
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;


</description>
      <category>react</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>javascript</category>
    </item>
    <item>
      <title>[Boost]</title>
      <dc:creator>Srushti Patil</dc:creator>
      <pubDate>Wed, 16 Jul 2025 14:40:20 +0000</pubDate>
      <link>https://dev.to/srushti/-o4j</link>
      <guid>https://dev.to/srushti/-o4j</guid>
      <description>&lt;div class="ltag__link"&gt;
  &lt;a href="/srushti" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&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%2Fuser%2Fprofile_image%2F3351134%2F929b6288-1488-4138-9e28-c220300458a5.png" alt="srushti"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="https://dev.to/srushti/jsx-is-not-html-and-thats-okay--kl" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;JSX is NOT HTML (And That’s Okay 😌)&lt;/h2&gt;
      &lt;h3&gt;Srushti Patil ・ Jul 14&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#webdev&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#beginners&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#react&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#jsx&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>react</category>
      <category>jsx</category>
    </item>
  </channel>
</rss>
