<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Bodhitech]]></title><description><![CDATA[Technology with Knowledge &amp; Awareness.]]></description><link>https://blog.mrchoubey.com</link><generator>RSS for Node</generator><lastBuildDate>Sat, 11 Apr 2026 03:21:01 GMT</lastBuildDate><atom:link href="https://blog.mrchoubey.com/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Tech Trends That Are Shaping 2026]]></title><description><![CDATA[1. AI Isn’t Just Smart — It’s Becoming Autonomous
Artificial Intelligence is no longer just answering questions — it’s evolving into agentic AI: systems that can perceive environments, make decisions, and take action with limited human input. This sh...]]></description><link>https://blog.mrchoubey.com/tech-trends-that-are-shaping-2026</link><guid isPermaLink="true">https://blog.mrchoubey.com/tech-trends-that-are-shaping-2026</guid><category><![CDATA[JavaScript]]></category><category><![CDATA[Web Development]]></category><category><![CDATA[Mobile Development]]></category><category><![CDATA[AI]]></category><category><![CDATA[Machine Learning]]></category><category><![CDATA[technology]]></category><category><![CDATA[Devops]]></category><category><![CDATA[Hashnode]]></category><category><![CDATA[Python]]></category><category><![CDATA[Java]]></category><category><![CDATA[Kubernetes]]></category><category><![CDATA[React]]></category><category><![CDATA[Node.js]]></category><category><![CDATA[MongoDB]]></category><category><![CDATA[FastAPI]]></category><dc:creator><![CDATA[Vivek Kr Choubey]]></dc:creator><pubDate>Thu, 15 Jan 2026 14:15:17 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/VUWDlBXGogg/upload/6a5019da9ebcab29d81422ca1ef671e9.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h3 id="heading-1-ai-isnt-just-smart-its-becoming-autonomous"><strong>1. AI Isn’t Just Smart — It’s Becoming Autonomous</strong></h3>
<p>Artificial Intelligence is no longer just answering questions — it’s evolving into <strong>agentic AI</strong>: systems that can perceive environments, make decisions, and take action with limited human input. This shift is changing how businesses operate, moving from experimentation to real, measurable impact.</p>
<ul>
<li><p>AI agents are increasingly acting like digital coworkers.</p>
</li>
<li><p>They automate complex workflows and expand human productivity.</p>
</li>
<li><p>Companies focus on <strong>AI systems integrated with workflows</strong>, not isolated models.</p>
</li>
</ul>
<h3 id="heading-2-robotics-meets-intelligence-physical-ai"><strong>2. Robotics Meets Intelligence: Physical AI</strong></h3>
<p>One of the biggest breakthroughs in tech this year is <strong>AI in the physical world.</strong> At major global tech events like CES 2026, robots powered by advanced AI models are capturing attention.</p>
<ul>
<li><p><strong>Physical AI</strong> means robots that understand and interact with real-world environments.</p>
</li>
<li><p>NVIDIA and partners revealed next-generation AI robots designed for industries from manufacturing to services.</p>
</li>
<li><p>Even playful innovations, such as LEGO’s Smart Play tech that blends physical play with smart sensors, show how tech is making everyday objects smarter.</p>
</li>
</ul>
<h3 id="heading-3-next-gen-devices-foldables-wearables-amp-edge-ai"><strong>3. Next-Gen Devices: Foldables, Wearables &amp; Edge AI</strong></h3>
<p>Consumers are seeing gadgets that are more powerful and more personal:</p>
<ul>
<li><p><strong>Foldable smartphones</strong> with tri-fold displays — like Samsung’s new Galaxy Z TriFold — blur the line between phone, tablet, and portable workstation.</p>
</li>
<li><p><strong>Wearable AI gadgets</strong> are emerging, with devices that record daily experiences and assist users in real-time without traditional screens.</p>
</li>
<li><p>AI is moving from data centers to “the edge” — meaning intelligent processing happens directly on devices like wearables and IoT products, improving speed and privacy.</p>
</li>
</ul>
<h3 id="heading-4-cloud-30-amp-hybrid-intelligence"><strong>4. Cloud 3.0 &amp; Hybrid Intelligence</strong></h3>
<p>The tech landscape is evolving beyond single-vendor cloud platforms:</p>
<ul>
<li><p><strong>Cloud 3.0</strong> represents hybrid and multi-cloud environments tailored to support advanced AI and agent workloads.</p>
</li>
<li><p>This architecture improves resilience and enables scalable AI solutions across diverse applications.</p>
</li>
</ul>
<p>Businesses that adopt these new cloud models can innovate faster and deploy AI capabilities at scale.</p>
<h3 id="heading-5-quantum-computing-is-moving-toward-reality"><strong>5. Quantum Computing Is Moving Toward Reality</strong></h3>
<p>Quantum computing — once theoretical — is now crossing important thresholds:</p>
<ul>
<li><p>Hybrid quantum-classical computing models are expected to solve complex problems that classical systems struggle with.</p>
</li>
<li><p>Institutions like IIIT Dharwad in India are moving toward <em>commercial quantum computers</em>, marking real progress in national tech infrastructure.</p>
</li>
</ul>
<p>Quantum computing may soon transform areas like logistics, drug discovery, and materials science.</p>
<h3 id="heading-6-tech-meets-real-world-challenges-supply-chains-amp-security"><strong>6. Tech Meets Real-World Challenges: Supply Chains &amp; Security</strong></h3>
<p>Tech isn’t just about gadgets — it’s also addressing systemic issues:</p>
<ul>
<li><p>Global supply chains remain under strain, pushing major companies like TSMC to invest heavily in new capacity to meet burgeoning demand, especially for AI chips.</p>
</li>
<li><p>At the same time, <strong>cybersecurity and data governance</strong> are becoming central concerns as AI systems proliferate across sectors.</p>
</li>
</ul>
<hr />
<h2 id="heading-final-thoughts">🌟 <strong>Final Thoughts</strong></h2>
<p>The tech market in 2026 is defined by integration — not just innovation. AI is no longer isolated to screens or cloud servers: it’s embedded in devices, robots, cloud infrastructure, and even physical playthings. Companies that leverage these trends — from autonomous AI agents to quantum power — will lead the next wave of transformation.</p>
<p>What’s clear is this: <strong>technology in 2026 is about amplifying human potential, solving real problems, and ushering in a new era of intelligent systems that work alongside us.</strong></p>
]]></content:encoded></item><item><title><![CDATA[Step-by-Step Guide to Verify Website Ownership on Google Search Console for GoDaddy, Namecheap, and Hostinger]]></title><description><![CDATA[Google Search Console (GSC) is a free and essential tool by Google that helps you monitor, maintain, and troubleshoot your site’s presence in Google Search results.Before you can use it, you must verify ownership — this confirms to Google that you’re...]]></description><link>https://blog.mrchoubey.com/step-by-step-guide-to-verify-website-ownership-on-google-search-console-for-godaddy-namecheap-and-hostinger</link><guid isPermaLink="true">https://blog.mrchoubey.com/step-by-step-guide-to-verify-website-ownership-on-google-search-console-for-godaddy-namecheap-and-hostinger</guid><category><![CDATA[hostinger]]></category><category><![CDATA[JavaScript]]></category><dc:creator><![CDATA[Vivek Kr Choubey]]></dc:creator><pubDate>Fri, 17 Oct 2025 07:38:29 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/KqiykWgHBtQ/upload/e84a8a48249c188e72e79dcced10fce1.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Google Search Console (GSC) is a free and essential tool by Google that helps you monitor, maintain, and troubleshoot your site’s presence in Google Search results.<br />Before you can use it, you must <strong>verify ownership</strong> — this confirms to Google that you’re the legitimate owner of the domain.</p>
<p>In this guide, you’ll learn <strong>how to verify your website ownership using the DNS (Domain Name System) method</strong>, including clear examples for <strong>GoDaddy, Namecheap, and Hostinger</strong>.</p>
<h2 id="heading-step-1-visit-google-search-console">🧭 Step 1: Visit Google Search Console</h2>
<ol>
<li><p>Go to 👉 https://search.google.com/search-console/.</p>
</li>
<li><p>Click <strong>“Start Now”</strong> and sign in with your Google account.</p>
</li>
</ol>
<h2 id="heading-step-2-add-a-property">🧱 Step 2: Add a Property</h2>
<p>Once you’re logged in, you’ll see two options for adding your website:</p>
<ul>
<li><p><strong>Domain Property</strong> – Covers all subdomains and protocols (<code>http</code>, <code>https</code>, <code>www</code>, etc.)</p>
</li>
<li><p><strong>URL Prefix Property</strong> – Verifies only one specific URL</p>
</li>
</ul>
<p><strong>Example:</strong><br />If your website is <a target="_blank" href="https://www.example.com"><code>https://www.example.com</code></a>, type only:</p>
<pre><code class="lang-javascript">example.com
</code></pre>
<h2 id="heading-step-3-copy-the-dns-txt-record">📋 Step 3: Copy the DNS TXT Record</h2>
<p>Google will now show a <strong>TXT record</strong> that you need to add to your domain’s DNS configuration.</p>
<p>Example:</p>
<pre><code class="lang-javascript">google-site-verification=abc123xyz456example
</code></pre>
<p>» Copy this record — you’ll paste it into your DNS settings next.</p>
<h2 id="heading-step-4-add-txt-record-in-your-domain-provider-godaddy-namecheap-hostinger">🌐 Step 4: Add TXT Record in Your Domain Provider (GoDaddy / Namecheap / Hostinger)</h2>
<p>Depending on where your domain is hosted, follow the respective steps below</p>
<h3 id="heading-for-godaddy">🟣 <strong>For GoDaddy</strong></h3>
<ol>
<li><p>Log in to your <strong>GoDaddy</strong> account.</p>
</li>
<li><p>Go to <strong>My Products → Domains → Manage DNS.</strong></p>
</li>
<li><p>Under <strong>Records</strong>, click <strong>Add</strong>.</p>
</li>
<li><p>Choose <strong>TXT</strong> as the type.</p>
</li>
<li><p>In the <strong>Host</strong> field, enter <code>@</code>.</p>
</li>
<li><p>In the <strong>Value</strong> field, paste the TXT record:</p>
<pre><code class="lang-javascript"> google-site-verification=abc123xyz456example
</code></pre>
<ol start="7">
<li>Click <strong>Save</strong>.</li>
</ol>
</li>
</ol>
<h3 id="heading-for-namecheap">🟢 <strong>For Namecheap</strong></h3>
<ol>
<li><p>Sign in to your <strong>Namecheap</strong> account.</p>
</li>
<li><p>Go to <strong>Domain List → Manage → Advanced DNS.</strong></p>
</li>
<li><p>Click <strong>Add New Record.</strong></p>
</li>
<li><p>Choose <strong>TXT Record.</strong></p>
</li>
<li><p>In <strong>Host</strong>, enter <code>@</code>.</p>
</li>
<li><p>In <strong>Value</strong>, paste:</p>
<pre><code class="lang-javascript"> google-site-verification=abc123xyz456example
</code></pre>
</li>
<li><p>Click <strong>Save Changes.</strong></p>
</li>
</ol>
<h3 id="heading-for-hostinger">🟣 <strong>For Hostinger</strong></h3>
<ol>
<li><p>Log in to your <strong>Hostinger</strong> account → Go to <strong>hPanel</strong>.</p>
</li>
<li><p>Select your domain and click <strong>DNS / Zone Editor.</strong></p>
</li>
<li><p>Under the <strong>Manage DNS Records</strong> section, click <strong>Add New Record.</strong></p>
</li>
<li><p>Choose <strong>TXT</strong> as the record type.</p>
</li>
<li><p>In <strong>Name</strong>, type <code>@</code> (or leave blank).</p>
</li>
<li><p>In <strong>TXT Value</strong>, paste the code from Google:</p>
<pre><code class="lang-javascript"> google-site-verification=abc123xyz456example
</code></pre>
</li>
<li><p>Set <strong>TTL</strong> to <code>3600</code> (default is fine).</p>
</li>
<li><p>Click <strong>Add Record.</strong></p>
</li>
</ol>
<p>    ✅ Once added, the DNS record will appear in your DNS list.</p>
<h2 id="heading-step-5-wait-for-dns-propagation">⏳ Step 5: Wait for DNS Propagation</h2>
<p>DNS changes can take anywhere between <strong>a few minutes and up to 24 hours</strong> to propagate globally.<br />If you try to verify immediately and it fails — don’t worry — just wait a bit and try again later.</p>
<hr />
<h2 id="heading-step-6-verify-in-google-search-console">🔍 Step 6: Verify in Google Search Console</h2>
<ol>
<li><p>Go back to your <strong>Google Search Console</strong> tab.</p>
</li>
<li><p>Click the <strong>“Verify”</strong> button.</p>
</li>
<li><p>If everything is correct, you’ll see a success message:</p>
<blockquote>
<p>🎉 <em>Ownership verified successfully!</em></p>
</blockquote>
</li>
</ol>
<p>If not, recheck your DNS record for typos or missing values, then try again after a few hours.</p>
<h2 id="heading-alternative-verification-methods-if-dns-access-is-not-possible">🧩 Alternative Verification Methods (If DNS Access Is Not Possible)</h2>
<p>If you can’t access your domain’s DNS, Google offers other ways to verify ownership:</p>
<ol>
<li><p><strong>HTML File Upload</strong> – Upload a file to your website root folder.</p>
</li>
<li><p><strong>HTML Tag</strong> – Add a meta tag in your website’s <code>&lt;head&gt;</code> section.</p>
</li>
<li><p><strong>Google Analytics</strong> – Verify via your existing Analytics tracking code.</p>
</li>
<li><p><strong>Google Tag Manager</strong> – Verify through your GTM container.</p>
</li>
</ol>
<hr />
<h2 id="heading-step-7-start-using-google-search-console">📊 Step 7: Start Using Google Search Console</h2>
<p>Once your domain is verified, you can:</p>
<ul>
<li><p>Check which keywords bring traffic</p>
</li>
<li><p>Monitor website clicks, impressions &amp; CTR</p>
</li>
<li><p>Submit XML sitemaps</p>
</li>
<li><p>Find and fix indexing errors</p>
</li>
<li><p>Analyze backlinks</p>
</li>
<li><p>Improve overall SEO performance</p>
</li>
</ul>
<hr />
<h2 id="heading-example-summary">🧠 Example Summary</h2>
<p><strong>Let’s say your domain is:</strong></p>
<pre><code class="lang-javascript">mysite.in
</code></pre>
<p>You would:</p>
<ol>
<li><p>Add it as a <strong>Domain Property</strong> in GSC.</p>
</li>
<li><p>Copy this TXT record:</p>
<pre><code class="lang-javascript"> google-site-verification=sj82kjsa9sk2djskd9
</code></pre>
</li>
<li><p>Add the record to <strong>Hostinger → DNS Zone Editor.</strong></p>
</li>
<li><p>Wait 1–2 hours.</p>
</li>
<li><p>Click <strong>Verify</strong> in Google Search Console.</p>
</li>
<li><p>Once verified, enjoy full access to performance data.</p>
</li>
</ol>
<hr />
<h2 id="heading-conclusion">🏁 Conclusion</h2>
<p>Verifying your website ownership in <strong>Google Search Console</strong> via the <strong>DNS (TXT) method</strong> is one of the most secure and reliable ways to connect your domain with Google.<br />Whether you use <strong>Hostinger, GoDaddy, or Namecheap</strong>, the process is simple — copy the TXT record, paste it in DNS, wait, and verify.</p>
<p>Once verified, you’ll unlock valuable insights about your website’s performance and ranking in Google Search results.</p>
]]></content:encoded></item><item><title><![CDATA[Mastering useEffect in React: A Fun Guide with Counter, Data, and Timer Examples]]></title><description><![CDATA[If you’re learning React, chances are you’ve heard about useEffect and wondered:

"Why does this hook exist? Why not just write everything in functions?"

Well, let’s break it down with an easy and fun example. We’ll build a little app that:

Keeps t...]]></description><link>https://blog.mrchoubey.com/mastering-useeffect-in-react-a-fun-guide-with-counter-data-and-timer-examples</link><guid isPermaLink="true">https://blog.mrchoubey.com/mastering-useeffect-in-react-a-fun-guide-with-counter-data-and-timer-examples</guid><category><![CDATA[JavaScript]]></category><category><![CDATA[React]]></category><category><![CDATA[technology]]></category><category><![CDATA[Developer]]></category><category><![CDATA[Web Development]]></category><category><![CDATA[Devops]]></category><category><![CDATA[GitHub]]></category><category><![CDATA[Python]]></category><category><![CDATA[Java]]></category><category><![CDATA[javascript framework]]></category><category><![CDATA[SQL]]></category><category><![CDATA[Go Language]]></category><category><![CDATA[vite]]></category><category><![CDATA[Devops articles]]></category><dc:creator><![CDATA[Vivek Kr Choubey]]></dc:creator><pubDate>Mon, 22 Sep 2025 17:19:29 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/XJXWbfSo2f0/upload/9f6dc3019d31f35b01fa0a3b6d98ce44.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>If you’re learning React, chances are you’ve heard about <code>useEffect</code> and wondered:</p>
<blockquote>
<p>"Why does this hook exist? Why not just write everything in functions?"</p>
</blockquote>
<p>Well, let’s break it down with an <strong>easy and fun example</strong>. We’ll build a little app that:</p>
<ul>
<li><p>Keeps track of a <strong>count</strong></p>
</li>
<li><p>Keeps track of some <strong>data</strong></p>
</li>
<li><p>Runs a <strong>timer</strong> that can start and stop</p>
</li>
</ul>
<p>And along the way, we’ll see how <code>useEffect</code> works in 3 different modes.</p>
<pre><code class="lang-javascript"><span class="hljs-keyword">import</span> React, { useEffect, useState } <span class="hljs-keyword">from</span> <span class="hljs-string">"react"</span>;

<span class="hljs-keyword">const</span> App = <span class="hljs-function">() =&gt;</span> {
  <span class="hljs-comment">// React states to hold different values</span>
  <span class="hljs-keyword">const</span> [count, setCount] = useState(<span class="hljs-number">0</span>); <span class="hljs-comment">// keeps track of count</span>
  <span class="hljs-keyword">const</span> [data, setData] = useState(<span class="hljs-number">10</span>); <span class="hljs-comment">// keeps track of data</span>
  <span class="hljs-keyword">const</span> [start, setStart] = useState(<span class="hljs-literal">false</span>); <span class="hljs-comment">// flag to check if timer started or stopped</span>
  <span class="hljs-keyword">const</span> [seconds, setSeconds] = useState(<span class="hljs-number">0</span>); <span class="hljs-comment">// timer counter</span>

  <span class="hljs-comment">// A simple function that logs a message</span>
  <span class="hljs-keyword">const</span> getExecuted = <span class="hljs-function">() =&gt;</span> {
    <span class="hljs-built_in">console</span>.log(<span class="hljs-string">"hi i will get executed always"</span>);
  };

  <span class="hljs-comment">// Function to increase count</span>
  <span class="hljs-keyword">const</span> Increment = <span class="hljs-function">() =&gt;</span> {
    setCount(<span class="hljs-function">(<span class="hljs-params">prev</span>) =&gt;</span> prev + <span class="hljs-number">1</span>);
  };

  <span class="hljs-comment">// Function to update data</span>
  <span class="hljs-keyword">const</span> updateData = <span class="hljs-function">() =&gt;</span> {
    setData(<span class="hljs-function">(<span class="hljs-params">prev</span>) =&gt;</span> prev + <span class="hljs-number">10</span>);
  };

  <span class="hljs-comment">// useEffect without dependency array → runs EVERY time component re-renders</span>
  useEffect(<span class="hljs-function">() =&gt;</span> {
    getExecuted();
  }); <span class="hljs-comment">// run on every render</span>

  <span class="hljs-comment">// useEffect with empty array → runs ONLY once when component mounts</span>
  useEffect(<span class="hljs-function">() =&gt;</span> {
    <span class="hljs-built_in">console</span>.log(<span class="hljs-string">"hi i will get executed once"</span>);
  }, []); <span class="hljs-comment">// run only once</span>

  <span class="hljs-comment">// useEffect with [data] dependency → runs when 'data' value changes</span>
  useEffect(<span class="hljs-function">() =&gt;</span> {
    <span class="hljs-built_in">console</span>.log(<span class="hljs-string">"hi i am will get executed when data will change"</span>, data);
  }, [data]); <span class="hljs-comment">// runs whenever data updates</span>

  <span class="hljs-comment">// Timer logic</span>
  useEffect(<span class="hljs-function">() =&gt;</span> {
    <span class="hljs-keyword">let</span> interval;
    <span class="hljs-keyword">if</span> (start) {
      <span class="hljs-built_in">console</span>.log(<span class="hljs-string">"Timer started"</span>);
      interval = <span class="hljs-built_in">setInterval</span>(<span class="hljs-function">() =&gt;</span> {
        <span class="hljs-comment">// increment seconds every 1 second</span>
        setSeconds(<span class="hljs-function">(<span class="hljs-params">prev</span>) =&gt;</span> prev + <span class="hljs-number">1</span>);
      }, <span class="hljs-number">1000</span>);
    } <span class="hljs-keyword">else</span> {
      <span class="hljs-built_in">console</span>.log(<span class="hljs-string">"Timer stopped"</span>);
    }

    <span class="hljs-comment">// cleanup function → clears the timer when component unmounts or 'start' changes</span>
    <span class="hljs-keyword">return</span> <span class="hljs-function">() =&gt;</span> {
      <span class="hljs-keyword">if</span> (interval) <span class="hljs-built_in">clearInterval</span>(interval);
      <span class="hljs-built_in">console</span>.log(<span class="hljs-string">"Timer cleaned up"</span>);
    };
  }, [start]); <span class="hljs-comment">// runs whenever start (true/false) changes</span>

  <span class="hljs-keyword">return</span> (
    <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">div</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">h1</span>&gt;</span>Count: {count}<span class="hljs-tag">&lt;/<span class="hljs-name">h1</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">h2</span>&gt;</span>Data: {data}<span class="hljs-tag">&lt;/<span class="hljs-name">h2</span>&gt;</span>
      {/* Buttons to update count and data */}
      <span class="hljs-tag">&lt;<span class="hljs-name">button</span> <span class="hljs-attr">onClick</span>=<span class="hljs-string">{Increment}</span>&gt;</span>Increment Count<span class="hljs-tag">&lt;/<span class="hljs-name">button</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">button</span> <span class="hljs-attr">onClick</span>=<span class="hljs-string">{updateData}</span>&gt;</span>Update Data<span class="hljs-tag">&lt;/<span class="hljs-name">button</span>&gt;</span>

      {/* Timer Display */}
      <span class="hljs-tag">&lt;<span class="hljs-name">h2</span>&gt;</span>Timer: {seconds} sec<span class="hljs-tag">&lt;/<span class="hljs-name">h2</span>&gt;</span>

      {/* Timer controls */}
      <span class="hljs-tag">&lt;<span class="hljs-name">button</span> <span class="hljs-attr">onClick</span>=<span class="hljs-string">{()</span> =&gt;</span> setStart(true)}&gt;▶ Start<span class="hljs-tag">&lt;/<span class="hljs-name">button</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">button</span> <span class="hljs-attr">onClick</span>=<span class="hljs-string">{()</span> =&gt;</span> setStart(false)}&gt;⏹ Stop<span class="hljs-tag">&lt;/<span class="hljs-name">button</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span></span>
  );
};

<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> App;
</code></pre>
<h3 id="heading-the-code">⚙️ The Code</h3>
<p>(You saw the full code above 👆. Don’t worry, we’ll explain it step by step.)</p>
<h3 id="heading-1-states-our-apps-memory">1. 📊 States: Our App’s Memory</h3>
<h3 id="heading-we-use-usestate-to-keep-track-of-different-things">» We use <code>useState</code> to keep track of different things:</h3>
<pre><code class="lang-javascript"><span class="hljs-keyword">const</span> [count, setCount] = useState(<span class="hljs-number">0</span>);
<span class="hljs-keyword">const</span> [data, setData] = useState(<span class="hljs-number">10</span>);
<span class="hljs-keyword">const</span> [start, setStart] = useState(<span class="hljs-literal">false</span>);
<span class="hljs-keyword">const</span> [seconds, setSeconds] = useState(<span class="hljs-number">0</span>);
</code></pre>
<p>» Think of states like <strong>notebooks</strong> in which React writes stuff down.</p>
<ul>
<li><p><code>count</code> is like the number of cookies eaten.</p>
</li>
<li><p><code>data</code> is some random number we increase by 10.</p>
</li>
<li><p><code>start</code> is a switch for the timer (on/off).</p>
</li>
<li><p><code>seconds</code> is literally the timer counting.</p>
</li>
</ul>
<h3 id="heading-2-useeffect-1-runs-on-every-render">2. 🔁 <code>useEffect</code> #1 – Runs on Every Render</h3>
<pre><code class="lang-javascript">useEffect(<span class="hljs-function">() =&gt;</span> {
  getExecuted();
});
</code></pre>
<p>This guy runs <strong>every single time the component re-renders</strong>.<br />Imagine someone shouting "I’m alive!" every time your app blinks. That’s this effect.</p>
<h3 id="heading-3-useeffect-2-runs-only-once">3. 🎉 <code>useEffect</code> #2 – Runs Only Once</h3>
<pre><code class="lang-javascript">useEffect(<span class="hljs-function">() =&gt;</span> {
  <span class="hljs-built_in">console</span>.log(<span class="hljs-string">"hi i am will get executed when data will change"</span>, data);
}, [data]);
</code></pre>
<p>This one is smarter — it runs only when <code>data</code> changes.<br />So if you eat 10 more cookies 🍪, React says: "Oh! Data changed, let me run this again.</p>
<h3 id="heading-5-timer-with-cleanup">5. ⏱ Timer with Cleanup</h3>
<p>The most exciting part — a <strong>timer</strong>:</p>
<pre><code class="lang-javascript">useEffect(<span class="hljs-function">() =&gt;</span> {
  <span class="hljs-keyword">let</span> interval;
  <span class="hljs-keyword">if</span> (start) {
    <span class="hljs-built_in">console</span>.log(<span class="hljs-string">"Timer started"</span>);
    interval = <span class="hljs-built_in">setInterval</span>(<span class="hljs-function">() =&gt;</span> {
      setSeconds(<span class="hljs-function">(<span class="hljs-params">prev</span>) =&gt;</span> prev + <span class="hljs-number">1</span>);
    }, <span class="hljs-number">1000</span>);
  } <span class="hljs-keyword">else</span> {
    <span class="hljs-built_in">console</span>.log(<span class="hljs-string">"Timer stopped"</span>);
  }

  <span class="hljs-keyword">return</span> <span class="hljs-function">() =&gt;</span> {
    <span class="hljs-keyword">if</span> (interval) <span class="hljs-built_in">clearInterval</span>(interval);
    <span class="hljs-built_in">console</span>.log(<span class="hljs-string">"Timer cleaned up"</span>);
  };
}, [start]);
</code></pre>
<ul>
<li><p>When you hit ▶ <strong>Start</strong>, it begins counting seconds.</p>
</li>
<li><p>When you hit ⏹ <strong>Stop</strong>, the timer halts.</p>
</li>
<li><p>The <strong>cleanup function</strong> makes sure we don’t create a new timer on top of an old one (otherwise, chaos: multiple timers racing 🏎️).</p>
</li>
</ul>
<h3 id="heading-final-thoughts">🎯 Final Thoughts</h3>
<p>This little app is like a <strong>playground for learning</strong> <code>useEffect</code>. You saw:</p>
<ol>
<li><p>How it runs on <strong>every render</strong></p>
</li>
<li><p>How it runs <strong>only once</strong></p>
</li>
<li><p>How it runs <strong>only when a dependency changes</strong></p>
</li>
<li><p>How to use it with <strong>timers and cleanup</strong></p>
</li>
</ol>
<p>So the next time someone asks:<br />👉 “When should I use <code>useEffect</code>?”</p>
<p>You can say:</p>
<ul>
<li><p>When you want something to happen <strong>every time</strong> → no dependencies</p>
</li>
<li><p>When you want something to happen <strong>only once</strong> → empty array <code>[]</code></p>
</li>
<li><p>When you want something to happen <strong>when X changes</strong> → <code>[X]</code></p>
</li>
</ul>
<p>Now it’s your turn 🎮:<br />👉 Try adding a <strong>Reset Timer</strong> button. Or maybe a <strong>Pause/Resume</strong> button. Once you do that, you’ll be officially leveling up in React! .</p>
<p>💡 If you enjoyed this post, share it with your developer friends or drop a comment with what you want me to explain next. And don’t forget to bookmark this page for quick React refreshers.</p>
]]></content:encoded></item><item><title><![CDATA[How to Use Debouncing and Throttling in JavaScript: Step-by-Step Guide]]></title><description><![CDATA[When building modern web applications, one common challenge is performance optimization. Think about actions like scrolling, resizing the window, or typing rapidly in an input field—these events can fire dozens of times per second. If every event tri...]]></description><link>https://blog.mrchoubey.com/how-to-use-debouncing-and-throttling-in-javascript-step-by-step-guide</link><guid isPermaLink="true">https://blog.mrchoubey.com/how-to-use-debouncing-and-throttling-in-javascript-step-by-step-guide</guid><category><![CDATA[#javascript  #webdevelopment  #frontend  #programming  #performance  #coding  #beginners  #softwareengineering  #devcommunity  #tutorial]]></category><dc:creator><![CDATA[Vivek Kr Choubey]]></dc:creator><pubDate>Fri, 19 Sep 2025 18:36:11 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/s9CC2SKySJM/upload/104a76025ef6236039525f038a3a8b24.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>When building modern web applications, one common challenge is <strong>performance optimization</strong>. Think about actions like scrolling, resizing the window, or typing rapidly in an input field—these events can fire dozens of times per second. If every event triggers heavy computations or API calls, your app will lag and your users will run away faster than you can say “JavaScript”!</p>
<p>That’s where <strong>debouncing</strong> and <strong>throttling</strong> come to the rescue. Let’s break them down with simple explanations and <strong>real-world examples</strong> you can relate to.</p>
<p>» What is Debouncing?</p>
<p>» <strong>Debouncing ensures that a function executes only after a certain period of inactivity.</strong><br />It’s like saying: <em>“Don’t bother me until you’ve stopped doing that action for a moment.”</em></p>
<hr />
<h3 id="heading-real-life-example-elevator-button">Real-Life Example: Elevator Button</h3>
<p>Ever noticed how people keep pressing the elevator button multiple times? But the elevator only responds <em>once</em> after the presses stop. That’s debouncing!</p>
<p>» Code Example: Debounced Notification Sender</p>
<pre><code class="lang-javascript"><span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">debounce</span>(<span class="hljs-params">func, delay</span>) </span>{
  <span class="hljs-keyword">let</span> timer;
  <span class="hljs-keyword">return</span> <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">...args</span>) </span>{
    <span class="hljs-built_in">clearTimeout</span>(timer);
    timer = <span class="hljs-built_in">setTimeout</span>(<span class="hljs-function">() =&gt;</span> func.apply(<span class="hljs-built_in">this</span>, args), delay);
  };
}

<span class="hljs-comment">// Example: Sending notification only when user stops typing</span>
<span class="hljs-keyword">const</span> notifyUser = debounce(<span class="hljs-function">(<span class="hljs-params">msg</span>) =&gt;</span> {
  <span class="hljs-built_in">console</span>.log(<span class="hljs-string">`📩 Notification Sent: <span class="hljs-subst">${msg}</span>`</span>);
}, <span class="hljs-number">1500</span>);

<span class="hljs-comment">// Simulating typing activity</span>
<span class="hljs-keyword">const</span> messages = [<span class="hljs-string">"Hel"</span>, <span class="hljs-string">"Hello"</span>, <span class="hljs-string">"Hello W"</span>, <span class="hljs-string">"Hello Wo"</span>, <span class="hljs-string">"Hello World!"</span>];

<span class="hljs-keyword">let</span> i = <span class="hljs-number">0</span>;
<span class="hljs-keyword">const</span> interval = <span class="hljs-built_in">setInterval</span>(<span class="hljs-function">() =&gt;</span> {
  notifyUser(messages[i]);
  i++;
  <span class="hljs-keyword">if</span> (i === messages.length) <span class="hljs-built_in">clearInterval</span>(interval);
}, <span class="hljs-number">400</span>);
</code></pre>
<p>📝 <strong>How this works:</strong></p>
<ul>
<li><p>User types continuously.</p>
</li>
<li><p>Instead of sending a notification for <em>every keystroke</em>, it waits until the user pauses for 1.5 seconds before sending the final message.</p>
</li>
</ul>
<hr />
<h2 id="heading-what-is-throttling">What is Throttling?</h2>
<p>👉 <strong>Throttling ensures that a function executes at most once within a specified time interval.</strong><br />It’s like saying: <em>“I’ll handle your request, but only once every X milliseconds, no matter how many times you ask.”</em></p>
<h3 id="heading-real-life-example-traffic-police-at-a-busy-junction">» Real-Life Example: Traffic Police at a Busy Junction</h3>
<p>Imagine a traffic cop who only lets cars move forward every 10 seconds. Even if 100 cars honk in between, only the next batch moves after the fixed interval.</p>
<p>» Code Example: Throttled GPS Tracker</p>
<pre><code class="lang-javascript">
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">throttle</span>(<span class="hljs-params">func, interval</span>) </span>{
  <span class="hljs-keyword">let</span> lastTime = <span class="hljs-number">0</span>;
  <span class="hljs-keyword">return</span> <span class="hljs-function"><span class="hljs-keyword">function</span> (<span class="hljs-params">...args</span>) </span>{
    <span class="hljs-keyword">const</span> now = <span class="hljs-built_in">Date</span>.now();
    <span class="hljs-keyword">if</span> (now - lastTime &gt;= interval) {
      func.apply(<span class="hljs-built_in">this</span>, args);
      lastTime = now;
    }
  };
}

<span class="hljs-comment">// Example: GPS location tracking (updates at most once per 2s)</span>
<span class="hljs-keyword">const</span> updateLocation = throttle(<span class="hljs-function">(<span class="hljs-params">coords</span>) =&gt;</span> {
  <span class="hljs-built_in">console</span>.log(<span class="hljs-string">`📍 User Location Updated: <span class="hljs-subst">${coords}</span>`</span>);
}, <span class="hljs-number">2000</span>);

<span class="hljs-comment">// Simulating rapid GPS updates</span>
<span class="hljs-keyword">let</span> step = <span class="hljs-number">1</span>;
<span class="hljs-keyword">const</span> gpsInterval = <span class="hljs-built_in">setInterval</span>(<span class="hljs-function">() =&gt;</span> {
  updateLocation(<span class="hljs-string">`Lat: 40.<span class="hljs-subst">${step}</span>, Lng: -74.<span class="hljs-subst">${step}</span>`</span>);
  step++;
  <span class="hljs-keyword">if</span> (step === <span class="hljs-number">8</span>) <span class="hljs-built_in">clearInterval</span>(gpsInterval);
}, <span class="hljs-number">500</span>);
</code></pre>
<p>📝 <strong>How this works:</strong></p>
<ul>
<li><p>Even though location updates come in every 0.5 seconds,</p>
</li>
<li><p>The app <strong>only updates once every 2 seconds</strong>, saving battery and bandwidth.</p>
</li>
</ul>
<hr />
<h2 id="heading-when-to-use-what">When to Use What?</h2>
<ul>
<li><p><strong>Debounce</strong> → When you want the action to happen <strong>only after the user stops</strong>.</p>
<p>  » Example: Search box, form validation, saving drafts.</p>
</li>
<li><p><strong>Throttle</strong> → When you want the action to happen <strong>at regular intervals</strong> while the event is continuously firing.</p>
<p>  » Example: Scroll events, GPS tracking, window resizing.</p>
</li>
</ul>
<h2 id="heading-final-thoughts">🎯 Final Thoughts</h2>
<p>Debouncing and throttling may sound like technical jargon, but in reality, they’re just <strong>smart time managers</strong> for your JavaScript functions. Use them wisely, and your apps will feel smoother, faster, and more professional.</p>
<p>Next time you’re coding, remember:</p>
<ul>
<li><p><strong>Debounce</strong> = “Wait until I stop.”</p>
</li>
<li><p><strong>Throttle</strong> = “Do it, but not too often.”</p>
</li>
</ul>
<hr />
<p>✨ <strong>If you found this helpful</strong>, don’t just keep it to yourself—share it with your developer friends or try implementing it in your next project. Your users (and your browser’s CPU) will thank you!</p>
<p>📝 <strong>Now it’s your turn!</strong><br />Did you enjoy this article? Then go ahead and <strong>share it, drop a comment, and give it a like</strong> 💡<br />Got questions or want me to cover a related topic? 🚀 Leave your thoughts below—I’ll do my best to get back to you!</p>
]]></content:encoded></item><item><title><![CDATA[🔹 What is HTML?

HTML is the language that structures the content on a web page. Think of it like the skeleton of a house — it gives shape and define]]></title><description><![CDATA[<!DOCTYPE html>
<html>
  <head>
    <title>My First Website</title>
  </head>
  <body>
    <h1>Hello, World!</h1>
    <p>This is my very first web page.</p>
  </body>
</html>

» When you open this code in a browser, it will show:» A big heading: Hell...]]></description><link>https://blog.mrchoubey.com/what-is-html-html-is-the-language-that-structures-the-content-on-a-web-page-think-of-it-like-the-skeleton-of-a-house-it-gives-shape-and-define</link><guid isPermaLink="true">https://blog.mrchoubey.com/what-is-html-html-is-the-language-that-structures-the-content-on-a-web-page-think-of-it-like-the-skeleton-of-a-house-it-gives-shape-and-define</guid><category><![CDATA[coding]]></category><category><![CDATA[HTML5]]></category><category><![CDATA[CSS]]></category><category><![CDATA[JavaScript]]></category><category><![CDATA[React]]></category><category><![CDATA[learning]]></category><category><![CDATA[Scaler]]></category><category><![CDATA[Learning Journey]]></category><category><![CDATA[Microservices]]></category><dc:creator><![CDATA[Vivek Kr Choubey]]></dc:creator><pubDate>Fri, 19 Sep 2025 12:30:40 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/vcF5y2Edm6A/upload/83e3a68c2cecf99aa2df8bc7d4edf8c0.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<pre><code class="lang-javascript">&lt;!DOCTYPE html&gt;
<span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">html</span>&gt;</span>
  <span class="hljs-tag">&lt;<span class="hljs-name">head</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">title</span>&gt;</span>My First Website<span class="hljs-tag">&lt;/<span class="hljs-name">title</span>&gt;</span>
  <span class="hljs-tag">&lt;/<span class="hljs-name">head</span>&gt;</span>
  <span class="hljs-tag">&lt;<span class="hljs-name">body</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">h1</span>&gt;</span>Hello, World!<span class="hljs-tag">&lt;/<span class="hljs-name">h1</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span>This is my very first web page.<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
  <span class="hljs-tag">&lt;/<span class="hljs-name">body</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-name">html</span>&gt;</span></span>
</code></pre>
<p>» When you open this code in a browser, it will show:<br />» A big heading: <strong>Hello, World!</strong><br />» A paragraph: <em>This is my very first web page.</em></p>
<h2 id="heading-why-learn-html">Why Learn HTML?</h2>
<p>» It’s the <strong>base of all websites</strong>.</p>
<p>» It’s <strong>easy to understand</strong> (even if you’re not a techie).</p>
<p>» It opens the door to learning <strong>CSS, JavaScript, and full web development</strong>.</p>
<p>» You can <strong>build your own blog, portfolio, or projects</strong> quickly.</p>
<h2 id="heading-how-to-start-learning-html-step-by-step">🔹 How to Start Learning HTML Step by Step</h2>
<ol>
<li><p><strong>Set Up Your Tools</strong></p>
<p> » You don’t need fancy software! Start with <strong>Notepad (Windows)</strong> or <strong>TextEdit (Mac)</strong> or a free code editor like <strong>VS Code</strong>.</p>
</li>
<li><p><strong>Learn Basic Tags</strong></p>
<p> » <code>&lt;h1&gt;</code> to <code>&lt;h6&gt;</code> → Headings</p>
<p> » <code>&lt;p&gt;</code> → Paragraph</p>
<p> » <code>&lt;a&gt;</code> → Link</p>
<p> » <code>&lt;img&gt;</code> → Image</p>
<p> » <code>&lt;div&gt;</code> → Section/Container</p>
</li>
</ol>
<pre><code class="lang-javascript">
&lt;h2&gt;About Me&lt;/h2&gt;
<span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span>I love coding and creating websites.<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span></span>
<span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">a</span> <span class="hljs-attr">href</span>=<span class="hljs-string">"https://google.com"</span>&gt;</span>Visit Google<span class="hljs-tag">&lt;/<span class="hljs-name">a</span>&gt;</span></span>
</code></pre>
<ol start="3">
<li><strong>Experiment Daily</strong></li>
</ol>
<p>» Build a <strong>small page every day</strong>: bio page, to-do list, photo gallery.</p>
<p>» Save your file as <code>index.html</code> → open it in your browser → see the result instantly!</p>
<ol start="4">
<li><p><strong>Use Free Resources</strong></p>
<p> » MDN Web Docs (by Mozilla)</p>
<p> » W3Schools HTML Tutorial</p>
<p> » Free YouTube crash courses</p>
</li>
<li><p><strong>Build Projects</strong></p>
<p> » Personal portfolio site</p>
<p> » Blog homepage</p>
<p> » Simple landing page</p>
</li>
<li><p><strong>Move to Next Step</strong><br /> » After HTML, learn <strong>CSS</strong> (for design) and <strong>JavaScript</strong> (for interactivity). Together, these three make you a <strong>front-end developer</strong>.</p>
</li>
</ol>
<h2 id="heading-tips-to-stay-motivated">🔹 Tips to Stay Motivated</h2>
<p>» Start small (one page at a time).</p>
<p>» Share your progress on LinkedIn or GitHub.</p>
<p>» Join communities (Reddit, Discord, Twitter dev groups).</p>
<p>» Celebrate every milestone — your first working page is a big win! 🎉.</p>
<h2 id="heading-final-thoughts">🏁 Final Thoughts</h2>
<p>HTML is not just for coders — it’s for <strong>anyone who wants to create on the web</strong>. With just a few lines of code, you can bring your ideas to life. Start today, practice daily, and soon you’ll be building amazing websites 🚀.</p>
<p><strong>Remember: <em>Every expert web developer once started with</em></strong> <code>&lt;h1&gt;Hello World&lt;/h1&gt;</code><strong>.</strong></p>
]]></content:encoded></item><item><title><![CDATA[Launch Your Software Developer Career in IT: Key Steps to Follow]]></title><description><![CDATA[Are you thinking about starting a career in the IT industry as a software developer but don’t know where to begin? You’re not alone! Many beginners feel overwhelmed by the number of programming languages, tools, and technologies available. But the tr...]]></description><link>https://blog.mrchoubey.com/launch-your-software-developer-career-in-it-key-steps-to-follow</link><guid isPermaLink="true">https://blog.mrchoubey.com/launch-your-software-developer-career-in-it-key-steps-to-follow</guid><category><![CDATA[coding]]></category><category><![CDATA[Beginner Developers]]></category><category><![CDATA[beginner]]></category><category><![CDATA[Devops]]></category><category><![CDATA[Developer]]></category><category><![CDATA[React]]></category><category><![CDATA[Frontend Development]]></category><category><![CDATA[backend]]></category><category><![CDATA[Python]]></category><category><![CDATA[.NET]]></category><category><![CDATA[JavaScript]]></category><category><![CDATA[Java]]></category><category><![CDATA[Express]]></category><category><![CDATA[Node.js]]></category><dc:creator><![CDATA[Vivek Kr Choubey]]></dc:creator><pubDate>Mon, 15 Sep 2025 16:08:46 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/ukzHlkoz1IE/upload/d71dd4024c201217da94c7918ec11f09.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Are you thinking about starting a career in the <strong>IT industry as a software developer</strong> but don’t know where to begin? You’re not alone! Many beginners feel overwhelmed by the number of programming languages, tools, and technologies available. But the truth is—starting your IT journey isn’t as complicated as it seems if you follow the right roadmap.</p>
<p>In this article, I’ll walk you through <strong>practical steps to kickstart your software development career</strong>, with a real-world example to make it easier to understand.</p>
<hr />
<h2 id="heading-why-choose-a-career-in-software-development">Why Choose a Career in Software Development?</h2>
<ul>
<li><p><strong>High demand:</strong> IT companies are constantly hiring skilled developers.</p>
</li>
<li><p><strong>Growth opportunities:</strong> You can move into roles like software architect, project manager, or even start your own product.</p>
</li>
<li><p><strong>Flexibility:</strong> Many developers work remotely or freelance.</p>
</li>
<li><p><strong>Great salaries:</strong> Skilled developers often get above-average pay packages worldwide.</p>
</li>
</ul>
<hr />
<h2 id="heading-step-1-build-the-right-foundation">Step 1: Build the Right Foundation</h2>
<p>Before diving into advanced frameworks, focus on the basics.</p>
<ol>
<li><p><strong>Learn core programming languages</strong> – Start with beginner-friendly languages like <strong>Python</strong> or <strong>JavaScript</strong>.</p>
</li>
<li><p><strong>Understand problem-solving</strong> – Practice algorithms and data structures on platforms like LeetCode, HackerRank, or Codeforces.</p>
</li>
<li><p><strong>Grasp fundamentals</strong> – Variables, loops, conditionals, functions, and OOP (Object-Oriented Programming) are must-know concepts.</p>
</li>
</ol>
<p>💡 <em>Example:</em> Imagine you want to build a simple calculator web app. By learning JavaScript basics (variables, functions, conditionals), you can create a calculator that performs addition, subtraction, multiplication, and division. This small project becomes your <strong>first step towards real-world coding</strong>.</p>
<hr />
<h2 id="heading-step-2-learn-industry-relevant-skills">Step 2: Learn Industry-Relevant Skills</h2>
<p>Employers look for candidates who can build practical applications. Here’s what to focus on:</p>
<ul>
<li><p><strong>Frontend Development</strong> → HTML, CSS, JavaScript, React.js</p>
</li>
<li><p><strong>Backend Development</strong> → Node.js, Express.js, Python (Django/Flask), or Java</p>
</li>
<li><p><strong>Databases</strong> → MySQL, MongoDB, PostgreSQL</p>
</li>
<li><p><strong>Version Control</strong> → Git &amp; GitHub</p>
</li>
<li><p><strong>Cloud Basics</strong> → AWS, Azure, or Google Cloud (optional for beginners)</p>
</li>
</ul>
<p>👉 Pro Tip: Follow a <strong>MERN stack</strong> (MongoDB, Express.js, React.js, Node.js) learning path. It’s one of the most in-demand stacks for web development.</p>
<hr />
<h2 id="heading-step-3-build-real-projects">Step 3: Build Real Projects</h2>
<p>The best way to prove your skills is by <strong>building projects</strong>.</p>
<p>Examples of beginner-friendly projects:</p>
<ul>
<li><p>To-Do List App</p>
</li>
<li><p>Blog Platform (with user login &amp; comments)</p>
</li>
<li><p>Expense Tracker</p>
</li>
<li><p>Portfolio Website</p>
</li>
</ul>
<p>📌 <em>Real Example:</em> A student named Riya started learning MERN stack. Within 6 months, she built a <strong>task management app</strong> where users can sign up, create tasks, and track progress. She added this project to her portfolio, and it became the highlight of her job interview.</p>
<hr />
<h2 id="heading-step-4-create-a-strong-portfolio">Step 4: Create a Strong Portfolio</h2>
<p>Your portfolio should include:</p>
<ul>
<li><p><strong>Projects (with live demo &amp; GitHub links)</strong></p>
</li>
<li><p><strong>About Me section</strong> (who you are, what you do)</p>
</li>
<li><p><strong>Resume</strong> (PDF or downloadable link)</p>
</li>
</ul>
<p>Tip: Keep your portfolio <strong>clean, modern, and mobile-friendly</strong>. Recruiters often check this before even looking at your resume.</p>
<hr />
<h2 id="heading-step-5-apply-for-jobs-amp-internships">Step 5: Apply for Jobs &amp; Internships</h2>
<p>Start small → Look for <strong>internships, freelance gigs, or junior developer positions</strong>. Even unpaid internships can give you valuable real-world exposure.</p>
<p>Tips for applications:</p>
<ul>
<li><p>Tailor your resume for each job.</p>
</li>
<li><p>Highlight <strong>projects &amp; skills</strong> instead of just theory.</p>
</li>
<li><p>Showcase your GitHub contributions.</p>
</li>
<li><p>Practice coding interview questions.</p>
</li>
</ul>
<hr />
<h2 id="heading-step-6-keep-learning-amp-growing">Step 6: Keep Learning &amp; Growing</h2>
<p>The IT industry evolves fast. As a developer, you should:</p>
<ul>
<li><p>Stay updated with new frameworks and tools.</p>
</li>
<li><p>Contribute to open-source projects.</p>
</li>
<li><p>Network with other developers via LinkedIn, Twitter, and local meetups.</p>
</li>
<li><p>Never stop coding—practice daily.</p>
</li>
</ul>
<hr />
<h2 id="heading-final-thoughts">Final Thoughts</h2>
<p>Starting a career in IT as a software developer is a journey that requires <strong>consistent effort, continuous learning, and real-world practice</strong>. The good news? You don’t need to be a genius—you just need <strong>curiosity, persistence, and a solid roadmap</strong>.</p>
<p>If you’re serious about becoming a developer, <strong>start today</strong>. Pick a language, build your first project, and gradually expand your skills. The more you practice, the more confident you’ll become—and soon, you’ll be ready to land your first IT job.</p>
]]></content:encoded></item><item><title><![CDATA[Step-by-Step Guide to Light/Dark Theme Toggle with React Context API]]></title><description><![CDATA[» In modern React applications, state management plays a crucial role. As applications grow larger, prop drilling (passing props down multiple levels) becomes a nightmare. This is where the React Context API shines — it provides a clean and powerful ...]]></description><link>https://blog.mrchoubey.com/step-by-step-guide-to-lightdark-theme-toggle-with-react-context-api</link><guid isPermaLink="true">https://blog.mrchoubey.com/step-by-step-guide-to-lightdark-theme-toggle-with-react-context-api</guid><category><![CDATA[Developer]]></category><category><![CDATA[JavaScript]]></category><category><![CDATA[React]]></category><category><![CDATA[software development]]></category><category><![CDATA[Devops]]></category><category><![CDATA[GitHub]]></category><category><![CDATA[Web Development]]></category><category><![CDATA[development]]></category><category><![CDATA[engineering]]></category><category><![CDATA[Hashnode]]></category><category><![CDATA[Java]]></category><dc:creator><![CDATA[Vivek Kr Choubey]]></dc:creator><pubDate>Sun, 31 Aug 2025 18:30:00 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/stock/unsplash/xkBaqlcqeb4/upload/721bc5b1062e4828314fc66bf545da15.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>» In modern React applications, <strong>state management</strong> plays a crucial role. As applications grow larger, <strong>prop drilling</strong> (passing props down multiple levels) becomes a nightmare. This is where the <strong>React Context API</strong> shines — it provides a clean and powerful way to share state across components without unnecessary prop drilling.</p>
<p>» In this article, we will dive deep into the <strong>Context API</strong> with an easy-to-understand <strong>Light/Dark Theme Toggle</strong> example. Along the way, we’ll explore how it works, why it’s useful, and best practices you can apply in real-world projects.</p>
<h2 id="heading-what-is-the-context-api">🔹 What is the Context API?</h2>
<p>The <strong>Context API</strong> is a built-in feature in React that allows you to <strong>create global state</strong> accessible by any component in the component tree, without passing props manually at every level.</p>
<ul>
<li><p>Think of Context as a <strong>“global store”</strong> for React components.</p>
</li>
<li><p>It allows <strong>data sharing</strong> across deeply nested components.</p>
</li>
<li><p>It’s a great alternative for simpler use cases where using heavy libraries like <strong>Redux</strong> or <strong>Zustand</strong> might be overkill.</p>
</li>
</ul>
<h2 id="heading-steps-to-use-context-api">🔹 Steps to Use Context API</h2>
<p>There are 3 main steps:</p>
<ol>
<li><p><strong>Create a Context</strong> using <code>createContext()</code>.</p>
</li>
<li><p><strong>Provide the Context</strong> using <code>Context.Provider</code>.</p>
</li>
<li><p><strong>Consume the Context</strong> using <code>useContext()</code>.</p>
</li>
</ol>
<p>Let’s break it down with the Theme Toggle example.</p>
<p>🔹 Step 1: Creating the Context &amp; Provider</p>
<pre><code class="lang-javascript"><span class="hljs-keyword">import</span> React, { createContext, useState } <span class="hljs-keyword">from</span> <span class="hljs-string">'react'</span>

<span class="hljs-comment">// Step 1: Create Context</span>
<span class="hljs-keyword">export</span> <span class="hljs-keyword">let</span> ThemeContext = createContext(<span class="hljs-string">''</span>)

<span class="hljs-keyword">const</span> ThemeProvider = <span class="hljs-function">(<span class="hljs-params">{children}</span>) =&gt;</span> {
  <span class="hljs-keyword">let</span> [theme, setTheme] = useState(<span class="hljs-string">'light'</span>)

  <span class="hljs-comment">// Step 2: Define logic to toggle theme</span>
  <span class="hljs-keyword">let</span> handleTheme = <span class="hljs-function">() =&gt;</span> {
    setTheme(<span class="hljs-function">(<span class="hljs-params">theme</span>) =&gt;</span> theme === <span class="hljs-string">"light"</span> ? <span class="hljs-string">"dark"</span> : <span class="hljs-string">"light"</span>)
  }

  <span class="hljs-keyword">return</span> (
    <span class="hljs-comment">// Step 3: Provide the context value</span>
    <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">ThemeContext.Provider</span> <span class="hljs-attr">value</span>=<span class="hljs-string">{{</span> <span class="hljs-attr">theme</span>, <span class="hljs-attr">handleTheme</span> }}&gt;</span>
      {children}
    <span class="hljs-tag">&lt;/<span class="hljs-name">ThemeContext.Provider</span>&gt;</span></span>
  )
}

<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> ThemeProvider
</code></pre>
<p>Here’s what’s happening:</p>
<ul>
<li><p><code>ThemeContext</code> is created using <code>createContext()</code>.</p>
</li>
<li><p><code>ThemeProvider</code> is a <strong>wrapper component</strong> that manages the <code>theme</code> state and provides it to all children components.</p>
</li>
<li><p>The <code>value</code> prop of <code>ThemeContext.Provider</code> contains both <code>theme</code> and the <code>handleTheme</code> function.</p>
</li>
</ul>
<p>🔹 Step 2: Wrapping the App with Provider</p>
<pre><code class="lang-javascript"><span class="hljs-keyword">import</span> React <span class="hljs-keyword">from</span> <span class="hljs-string">'react'</span>
<span class="hljs-keyword">import</span> ThemeProvider <span class="hljs-keyword">from</span> <span class="hljs-string">'./ThemeProvider'</span>
<span class="hljs-keyword">import</span> Home <span class="hljs-keyword">from</span> <span class="hljs-string">'./Home'</span>
<span class="hljs-keyword">import</span> Profile <span class="hljs-keyword">from</span> <span class="hljs-string">'./Profile'</span>

<span class="hljs-keyword">const</span> App = <span class="hljs-function">() =&gt;</span> {
  <span class="hljs-keyword">return</span> (
    <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">ThemeProvider</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">Home</span> /&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">Profile</span> /&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">ThemeProvider</span>&gt;</span></span>
  )
}

<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> App
</code></pre>
<p>Here we wrap <code>&lt;Home/&gt;</code> , <code>&lt;Profile/&gt;</code> with <code>&lt;ThemeProvider&gt;</code>.<br />This means <strong>all components inside ThemeProvider can now access</strong> <code>theme</code> and <code>handleTheme</code> directly.</p>
<p>Step 3: Consuming the Context</p>
<pre><code class="lang-javascript"><span class="hljs-keyword">import</span> React, { useContext } <span class="hljs-keyword">from</span> <span class="hljs-string">'react'</span>
<span class="hljs-keyword">import</span> { ThemeContext } <span class="hljs-keyword">from</span> <span class="hljs-string">'./ThemeProvider'</span>

<span class="hljs-keyword">const</span> Profile = <span class="hljs-function">() =&gt;</span> {
  <span class="hljs-keyword">let</span> { theme } = useContext(ThemeContext)

  <span class="hljs-keyword">let</span> styles = {
    <span class="hljs-attr">background</span>: theme === <span class="hljs-string">"light"</span> ? <span class="hljs-string">"#f0f0f0"</span> : <span class="hljs-string">"#444"</span>,
    <span class="hljs-attr">color</span>: theme === <span class="hljs-string">"light"</span> ? <span class="hljs-string">"#111"</span> : <span class="hljs-string">"#eee"</span>,
    <span class="hljs-attr">padding</span>: <span class="hljs-string">"30px"</span>,
    <span class="hljs-attr">textAlign</span>: <span class="hljs-string">"center"</span>,
    <span class="hljs-attr">borderRadius</span>: <span class="hljs-string">"10px"</span>,
    <span class="hljs-attr">marginTop</span>: <span class="hljs-string">"20px"</span>
  }

  <span class="hljs-keyword">return</span> (
    <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">style</span>=<span class="hljs-string">{styles}</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">h2</span>&gt;</span>Profile Section<span class="hljs-tag">&lt;/<span class="hljs-name">h2</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">p</span>&gt;</span>This section also follows the <span class="hljs-tag">&lt;<span class="hljs-name">b</span>&gt;</span>{theme.toUpperCase()} MODE<span class="hljs-tag">&lt;/<span class="hljs-name">b</span>&gt;</span>.<span class="hljs-tag">&lt;/<span class="hljs-name">p</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span></span>
  )
}

<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> Profile
</code></pre>
<pre><code class="lang-javascript"><span class="hljs-keyword">import</span> React, { useContext } <span class="hljs-keyword">from</span> <span class="hljs-string">'react'</span>
<span class="hljs-keyword">import</span> { ThemeContext } <span class="hljs-keyword">from</span> <span class="hljs-string">'./ThemeProvider'</span>

<span class="hljs-keyword">const</span> Home = <span class="hljs-function">() =&gt;</span> {
  <span class="hljs-keyword">let</span> { theme, handleTheme } = useContext(ThemeContext)

  <span class="hljs-keyword">let</span> styles = {
    <span class="hljs-attr">background</span>: theme === <span class="hljs-string">"light"</span> ? <span class="hljs-string">"#fff"</span> : <span class="hljs-string">"#333"</span>,
    <span class="hljs-attr">color</span>: theme === <span class="hljs-string">"light"</span> ? <span class="hljs-string">"#333"</span> : <span class="hljs-string">"#fff"</span>,
    <span class="hljs-attr">padding</span>: <span class="hljs-string">"50px"</span>,
    <span class="hljs-attr">textAlign</span>: <span class="hljs-string">"center"</span>
  }

  <span class="hljs-keyword">return</span> (
    <span class="xml"><span class="hljs-tag">&lt;<span class="hljs-name">div</span> <span class="hljs-attr">style</span>=<span class="hljs-string">{styles}</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">h1</span>&gt;</span>{theme.toUpperCase()} MODE<span class="hljs-tag">&lt;/<span class="hljs-name">h1</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">button</span> <span class="hljs-attr">onClick</span>=<span class="hljs-string">{handleTheme}</span>&gt;</span>Toggle Theme<span class="hljs-tag">&lt;/<span class="hljs-name">button</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">div</span>&gt;</span></span>
  )
}

<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> Home
</code></pre>
<ul>
<li><p><code>useContext(ThemeContext)</code> is used to <strong>consume</strong> the context.</p>
</li>
<li><p>Now, <code>theme</code> and <code>handleTheme</code> are available inside the <code>Home</code> and <code>profile</code> component.</p>
</li>
<li><p>The UI dynamically switches between <strong>Light Mode</strong> and <strong>Dark Mode</strong> when the button is clicked.</p>
</li>
</ul>
<h2 id="heading-benefits-of-using-context-api">🔹 Benefits of Using Context API</h2>
<p>✅ <strong>No more prop drilling</strong> – Pass data once at the top and consume it anywhere.<br />✅ <strong>Simple state management</strong> – Great for small to medium-scale apps.<br />✅ <strong>Improves maintainability</strong> – Your code is cleaner, modular, and reusable.<br />✅ <strong>Performance friendly</strong> – React ensures only the necessary components re-render.</p>
<h2 id="heading-when-to-use-context-api">🔹 When to Use Context API?</h2>
<ul>
<li><p>When <strong>global state</strong> is required across multiple components (e.g., theme, authentication, language preference).</p>
</li>
<li><p>When you want to <strong>avoid Redux/other state libraries</strong> for small projects.</p>
</li>
<li><p>When <strong>data sharing</strong> between non-parent-child components is necessary.</p>
</li>
</ul>
<p>⚠️ <strong>Caution:</strong> Don’t overuse Context API for everything. For large-scale applications with complex business logic, <strong>Redux Toolkit, Zustand, or Recoil</strong> might be better choices.</p>
<h2 id="heading-final-thoughts">🔹 Final Thoughts</h2>
<p>The <strong>React Context API</strong> is a game-changer for state management when used correctly. Our <strong>Theme Toggle</strong> example is simple, yet powerful enough to demonstrate how Context helps us manage shared state.</p>
<p>If you’re building a <strong>real-world application</strong>, consider combining Context with other tools (like custom hooks, reducers, or middleware) for even greater flexibility.</p>
<p>By mastering Context API, you’ll take one more step toward becoming a <strong>pro-level React developer</strong>.</p>
]]></content:encoded></item></channel></rss>