<?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: Vidya</title>
    <description>The latest articles on DEV Community by Vidya (@vidya_cdd37fca763a53a10e2).</description>
    <link>https://dev.to/vidya_cdd37fca763a53a10e2</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3528439%2F159a3662-c7e2-427c-910d-baaf2baa7ac6.png</url>
      <title>DEV Community: Vidya</title>
      <link>https://dev.to/vidya_cdd37fca763a53a10e2</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/vidya_cdd37fca763a53a10e2"/>
    <language>en</language>
    <item>
      <title>useMemo vs useCallback in React</title>
      <dc:creator>Vidya</dc:creator>
      <pubDate>Mon, 15 Jun 2026 12:40:34 +0000</pubDate>
      <link>https://dev.to/vidya_cdd37fca763a53a10e2/usememo-vs-usecallback-in-react-gaf</link>
      <guid>https://dev.to/vidya_cdd37fca763a53a10e2/usememo-vs-usecallback-in-react-gaf</guid>
      <description>&lt;p&gt;React applications re-render whenever state or props change. In most cases, React handles re-rendering efficiently. However, in large applications with complex calculations or deeply nested components, unnecessary re-renders can impact performance.&lt;/p&gt;

&lt;p&gt;To solve this problem, React provides two optimization hooks:&lt;/p&gt;

&lt;p&gt;useMemo – Memoizes a value.&lt;br&gt;
useCallback – Memoizes a function.&lt;/p&gt;

&lt;p&gt;Although both are used for performance optimization, they serve different purposes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is useMemo?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;useMemo is a React Hook that stores (memoizes) the result of a calculation and reuses it on future renders until one of its dependencies changes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Definition&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;useMemo prevents React from recalculating a value every time the component renders. Instead, it recalculates only when the specified dependencies change.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Syntax&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;memoizedValue&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useMemo&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;expensiveCalculation&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;dependency&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;How it Works&lt;/strong&gt;&lt;br&gt;
   =&amp;gt; React executes the function during the first render.&lt;br&gt;
   =&amp;gt; The returned value is stored in memory.&lt;br&gt;
   =&amp;gt; On subsequent renders, React checks the dependency array.&lt;br&gt;
   =&amp;gt; If dependencies haven't changed, React returns the stored value.&lt;br&gt;
   =&amp;gt; If dependencies change, React recalculates and stores the new value.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example Without useMemo&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;ProductList&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;products&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;sortedProducts&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;products&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sort&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;
    &lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;price&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;price&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;sortedProducts&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;product&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt; &lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;product&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;product&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;))&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Problem&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Every time the component renders:&lt;br&gt;
    =&amp;gt; The sorting operation runs again.&lt;br&gt;
    =&amp;gt; Even if the products array hasn't changed.&lt;br&gt;
    =&amp;gt; This wastes CPU resources.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example With useMemo&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useMemo&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;ProductList&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;products&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;sortedProducts&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useMemo&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;[...&lt;/span&gt;&lt;span class="nx"&gt;products&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;sort&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;
      &lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;price&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;price&lt;/span&gt;
    &lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;products&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;

  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;sortedProducts&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;product&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt; &lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;product&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;product&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;p&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;))&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Benefit&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now sorting happens only when the products array changes.&lt;br&gt;
If another state changes in the component:&lt;br&gt;
    =&amp;gt; React re-renders.&lt;br&gt;
    =&amp;gt; Sorting is skipped.&lt;br&gt;
    =&amp;gt; The stored value is reused.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is useCallback?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;useCallback is a React Hook that stores a function and returns the same function reference across renders until dependencies change.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Definition&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;useCallback prevents React from creating a new function every time the component renders.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Syntax&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;memoizedFunction&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useCallback&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// function logic&lt;/span&gt;
&lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;dependency&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Why Do We Need useCallback?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Consider this example:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;Parent&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;count&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setCount&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;handleClick&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Button clicked&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;};&lt;/span&gt;

  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Child&lt;/span&gt; &lt;span class="na"&gt;onClick&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;handleClick&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

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

&lt;/div&gt;



&lt;p&gt;Whenever count changes:&lt;br&gt;
    --&amp;gt; Parent re-renders.&lt;br&gt;
    --&amp;gt; A new handleClick function is created.&lt;br&gt;
    --&amp;gt; Child receives a new function reference.&lt;br&gt;
    --&amp;gt; Child re-renders unnecessarily.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example With useCallback&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useCallback&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt; 

function Parent() {

  const [count, setCount] = useState(0);

  const handleClick = useCallback(() =&amp;gt; {
    console.log(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="nx"&gt;Button&lt;/span&gt; &lt;span class="nx"&gt;clicked&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;);
  }, []);

  return (
    &amp;lt;Child onClick={handleClick} /&amp;gt;
  );
}
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Benefit&lt;/strong&gt;&lt;br&gt;
  --&amp;gt; The same function reference is reused.&lt;br&gt;
  --&amp;gt; Child component doesn't re-render unnecessarily.&lt;br&gt;
  --&amp;gt; Performance improves.&lt;/p&gt;

</description>
      <category>usememo</category>
      <category>usecallback</category>
      <category>programming</category>
      <category>react</category>
    </item>
    <item>
      <title>useState vs useReducer in React</title>
      <dc:creator>Vidya</dc:creator>
      <pubDate>Sat, 13 Jun 2026 07:16:24 +0000</pubDate>
      <link>https://dev.to/vidya_cdd37fca763a53a10e2/usestate-vs-usereducer-in-react-2ojl</link>
      <guid>https://dev.to/vidya_cdd37fca763a53a10e2/usestate-vs-usereducer-in-react-2ojl</guid>
      <description>&lt;p&gt;&lt;strong&gt;What is useState?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;useState is a React Hook that allows functional components to create and manage state. Before Hooks were introduced, state could only be managed inside class components. With useState, developers can store values such as numbers, strings, booleans, arrays, and objects directly inside functional components and update them whenever needed.&lt;/p&gt;

&lt;p&gt;Whenever the state changes, React automatically re-renders the component and updates the UI with the latest data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Syntax&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setState&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;initialValue&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;--&amp;gt; state → Current value of the state.&lt;br&gt;
--&amp;gt; setState → Function used to update the state.&lt;br&gt;
--&amp;gt; initialValue → Initial value assigned to the state.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example: Counter Application&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useState&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;Counter&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;count&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setCount&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;h2&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Count&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;count&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/h2&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt; &lt;span class="nx"&gt;onClick&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;setCount&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;count&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nx"&gt;Increment&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/button&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/div&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;Counter&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;How it Works&lt;/strong&gt;&lt;br&gt;
  =&amp;gt; useState(0) initializes the state with 0.&lt;br&gt;
  =&amp;gt; count stores the current value.&lt;br&gt;
  =&amp;gt; setCount() updates the value.&lt;br&gt;
  =&amp;gt; When the button is clicked, React re-renders the component with the updated count.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When to Use useState?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;--&amp;gt; Counter applications&lt;br&gt;
 --&amp;gt; Show/Hide functionality&lt;br&gt;
 --&amp;gt; Theme switching&lt;br&gt;
 --&amp;gt; Simple forms&lt;br&gt;
 --&amp;gt; Managing a single piece of state&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is useReducer?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;useReducer is a React Hook used for managing complex state logic. Instead of updating state directly, it uses a reducer function and actions to determine how the state should change.&lt;/p&gt;

&lt;p&gt;It follows the same concept as Redux, where actions are dispatched and a reducer function decides the next state based on the action type.&lt;/p&gt;

&lt;p&gt;useReducer is useful when a component has multiple state values or complex update logic.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Syntax&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;dispatch&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useReducer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;reducer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;initialState&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;=&amp;gt; state → Current state.&lt;br&gt;
  =&amp;gt; dispatch → Function used to send actions.&lt;br&gt;
  =&amp;gt; reducer → Function that handles state updates.&lt;br&gt;
  =&amp;gt; initialState → Initial state value.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example: Counter using useReducer&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;useReducer&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;react&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;initialState&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;count&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;reducer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;action&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;switch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;action&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;type&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;increment&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;count&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;count&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;

    &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;decrement&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;count&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;count&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;

    &lt;span class="nl"&gt;default&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;Counter&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;dispatch&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useReducer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="nx"&gt;reducer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nx"&gt;initialState&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;h2&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="nx"&gt;Count&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;count&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/h2&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt; &lt;span class="nx"&gt;onClick&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;
        &lt;span class="nf"&gt;dispatch&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;increment&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nx"&gt;Increment&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/button&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;button&lt;/span&gt; &lt;span class="nx"&gt;onClick&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;
        &lt;span class="nf"&gt;dispatch&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;decrement&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nx"&gt;Decrement&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/button&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/div&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;Counter&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;How it Works&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;--&amp;gt; initialState stores the starting state.&lt;br&gt;
 --&amp;gt; reducer() receives the current state and action.&lt;br&gt;
 --&amp;gt; dispatch() sends an action.&lt;br&gt;
 --&amp;gt; The reducer decides how the state should change.&lt;br&gt;
 --&amp;gt; React re-renders the component with the updated state.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Real-World Example&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Using useState&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setName&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;""&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;email&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setEmail&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;""&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;age&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;setAge&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;useState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;""&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

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

&lt;/div&gt;



&lt;p&gt;--&amp;gt; This is fine for a small form with a few fields.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Using useReducer&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;initialState&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;email&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;age&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;""&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;reducer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;action&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;switch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;action&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;type&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;UPDATE_NAME&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;action&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;payload&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;

    &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;UPDATE_EMAIL&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;email&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;action&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;payload&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;

    &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;UPDATE_AGE&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;age&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;action&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;payload&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;

    &lt;span class="nl"&gt;default&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

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

&lt;/div&gt;



&lt;p&gt;--&amp;gt; For large forms with validations and multiple updates, useReducer keeps the code cleaner and easier to maintain.&lt;/p&gt;

</description>
      <category>react</category>
      <category>usestate</category>
      <category>usereducer</category>
    </item>
    <item>
      <title>Why Java Supports Multithreading While JavaScript is Single-Threaded?</title>
      <dc:creator>Vidya</dc:creator>
      <pubDate>Fri, 12 Jun 2026 05:27:24 +0000</pubDate>
      <link>https://dev.to/vidya_cdd37fca763a53a10e2/why-java-supports-multithreading-while-javascript-is-single-threaded-m3n</link>
      <guid>https://dev.to/vidya_cdd37fca763a53a10e2/why-java-supports-multithreading-while-javascript-is-single-threaded-m3n</guid>
      <description>&lt;p&gt;&lt;strong&gt;Why is Java Multithreaded but JavaScript Traditionally Single-Threaded?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Java and JavaScript are both popular programming languages, but they handle execution differently. One of the biggest differences is that Java supports true multithreading, while JavaScript was originally designed as a single-threaded language.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is Multithreading?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Multithreading is the ability of a program to run multiple threads simultaneously. A thread is a lightweight unit of execution within a process. By using multiple threads, a program can perform several tasks at the same time, improving performance and responsiveness.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why Does Java Support Multithreading?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Java was designed for building large-scale enterprise applications, desktop software, servers, and systems that often need to handle multiple tasks concurrently.&lt;/p&gt;

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

&lt;p&gt;--&amp;gt; A banking application can process transactions while generating reports.&lt;br&gt;
--&amp;gt; A web server can handle thousands of client requests simultaneously.&lt;br&gt;
--&amp;gt; A desktop application can perform background tasks while keeping the user interface responsive.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Java provides built-in support for multithreading through:&lt;/strong&gt;&lt;br&gt;
   =&amp;gt; Thread class&lt;br&gt;
   =&amp;gt; Runnable interface&lt;br&gt;
   =&amp;gt; Executor Framework&lt;br&gt;
   =&amp;gt; Concurrency utilities (java.util.concurrent)&lt;/p&gt;

&lt;p&gt;Because of this, Java can utilize multiple CPU cores efficiently and execute threads in parallel.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why Was JavaScript Designed as Single-Threaded?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;JavaScript was originally created to run inside web browsers. Since browsers manipulate the DOM (Document Object Model), allowing multiple threads to modify the same web page simultaneously could lead to conflicts and unpredictable behavior.&lt;/p&gt;

&lt;p&gt;To avoid these issues, JavaScript was designed with a single-threaded execution model. This means only one piece of JavaScript code runs at a time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For example:&lt;/strong&gt;&lt;br&gt;
  --&amp;gt; A button click event&lt;br&gt;
  --&amp;gt; Form validation&lt;br&gt;
  --&amp;gt; DOM updates&lt;/p&gt;

&lt;p&gt;These operations execute one after another in a single thread, making browser behavior simpler and safer.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How Does JavaScript Handle Multiple Tasks?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Although JavaScript is single-threaded, it can still perform asynchronous operations using:&lt;br&gt;
  =&amp;gt; Event Loop&lt;br&gt;
  =&amp;gt; Callbacks&lt;br&gt;
  =&amp;gt; Promises&lt;br&gt;
  =&amp;gt; Async/Await&lt;/p&gt;

&lt;p&gt;For example, while waiting for an API response, JavaScript does not block the entire application. Instead, it continues executing other code and processes the response when it arrives.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Modern JavaScript and Background Threads&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Today, JavaScript can use additional threads through:&lt;/strong&gt;&lt;br&gt;
   =&amp;gt; Web Workers (Browser)&lt;br&gt;
   =&amp;gt; Worker Threads (Node.js)&lt;/p&gt;

&lt;p&gt;These allow heavy computations to run in the background without blocking the main thread. However, JavaScript's core execution model remains single-threaded.&lt;/p&gt;

</description>
      <category>java</category>
      <category>javascript</category>
      <category>programming</category>
      <category>advance</category>
    </item>
    <item>
      <title>Java vs JavaScript: Understanding the Key Differences</title>
      <dc:creator>Vidya</dc:creator>
      <pubDate>Thu, 11 Jun 2026 13:23:45 +0000</pubDate>
      <link>https://dev.to/vidya_cdd37fca763a53a10e2/java-vs-javascript-understanding-the-key-differences-43p8</link>
      <guid>https://dev.to/vidya_cdd37fca763a53a10e2/java-vs-javascript-understanding-the-key-differences-43p8</guid>
      <description>&lt;p&gt;Many beginners assume that Java and JavaScript are the same because of their similar names. However, they are completely different programming languages designed for different purposes. Understanding the differences between Java and JavaScript helps developers choose the right language for their projects.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is Java?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Java is a high-level, object-oriented programming language developed by Oracle Corporation. It follows the principle of "Write Once, Run Anywhere" (WORA), which means Java programs can run on any platform that has a Java Virtual Machine (JVM). Java is widely used for enterprise applications, Android development, desktop software, and backend web applications.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Features of Java&lt;/strong&gt;&lt;br&gt;
   =&amp;gt; Object-Oriented Programming (OOP)&lt;br&gt;
   =&amp;gt; Platform Independent&lt;br&gt;
   =&amp;gt; Strongly Typed Language&lt;br&gt;
   =&amp;gt; Secure and Robust&lt;br&gt;
   =&amp;gt; Multithreading Support&lt;br&gt;
   =&amp;gt; Excellent Performance with JVM&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is JavaScript?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;JavaScript is a lightweight, high-level scripting language primarily used to create interactive and dynamic web pages. It was developed by Brendan Eich in 1995. JavaScript runs directly in web browsers and is one of the core technologies of web development alongside HTML and CSS.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Features of JavaScript&lt;/strong&gt;&lt;br&gt;
    =&amp;gt; Lightweight and Interpreted&lt;br&gt;
    =&amp;gt; Dynamic Typing&lt;br&gt;
    =&amp;gt; Event-Driven Programming&lt;br&gt;
    =&amp;gt; Supports Functional and Object-Oriented Programming&lt;br&gt;
    =&amp;gt; Runs in Browsers and Servers&lt;br&gt;
    =&amp;gt; Fast Development and Deployment&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example: Java Program&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Main&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;static&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="o"&gt;[]&lt;/span&gt; &lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="nc"&gt;System&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;out&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;println&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Hello World"&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Example: JavaScript Program&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Hello World&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;When Should You Use Java?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use Java when:&lt;/strong&gt;&lt;br&gt;
   --&amp;gt; Building enterprise applications&lt;br&gt;
   --&amp;gt; Developing Android applications&lt;br&gt;
   --&amp;gt; Creating large-scale backend systems&lt;br&gt;
   --&amp;gt; Working on banking and financial software&lt;br&gt;
   --&amp;gt; Developing desktop applications&lt;br&gt;
   --&amp;gt; When Should You Use JavaScript?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use JavaScript when:&lt;/strong&gt;&lt;br&gt;
   --&amp;gt; Building interactive websites&lt;br&gt;
   --&amp;gt; Creating web applications&lt;br&gt;
   --&amp;gt; Developing frontend user interfaces&lt;br&gt;
   --&amp;gt; Working with frameworks like React, Angular, or Vue&lt;br&gt;
   --&amp;gt; Building server-side applications using Node.js&lt;/p&gt;

</description>
      <category>java</category>
      <category>javascript</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
    <item>
      <title>JavaScript Libraries and Frameworks</title>
      <dc:creator>Vidya</dc:creator>
      <pubDate>Wed, 10 Jun 2026 07:28:00 +0000</pubDate>
      <link>https://dev.to/vidya_cdd37fca763a53a10e2/javascript-libraries-and-frameworks-459m</link>
      <guid>https://dev.to/vidya_cdd37fca763a53a10e2/javascript-libraries-and-frameworks-459m</guid>
      <description>&lt;p&gt;JavaScript is one of the most popular programming languages used for web development. It helps developers create interactive and dynamic websites. To make development faster and easier, developers use JavaScript libraries and frameworks. Although both help in building applications, they serve different purposes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is a JavaScript Library?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A JavaScript library is a collection of pre-written JavaScript code that developers can use to perform common tasks. Libraries provide reusable functions and components, allowing developers to avoid writing code from scratch.&lt;/p&gt;

&lt;p&gt;In a library, the developer controls the flow of the application and calls the library functions whenever needed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Popular JavaScript Libraries&lt;/strong&gt;&lt;br&gt;
    =&amp;gt; React&lt;br&gt;
    =&amp;gt; jQuery&lt;br&gt;
    =&amp;gt; Lodash&lt;br&gt;
    =&amp;gt; D3.js&lt;br&gt;
    =&amp;gt; Chart.js&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Advantages of Libraries&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;--&amp;gt; Faster development&lt;br&gt;
   --&amp;gt; Reusable code&lt;br&gt;
   --&amp;gt; Easy to learn and use&lt;br&gt;
   --&amp;gt; Reduces repetitive coding&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is a JavaScript Framework?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A JavaScript framework is a complete structure that provides rules, tools, and predefined architecture for developing applications. Frameworks control the application's flow and determine how the code should be organized.&lt;/p&gt;

&lt;p&gt;In a framework, the framework itself calls the developer's code when required. This concept is known as "Inversion of Control."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Popular JavaScript Frameworks&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;=&amp;gt; Angular&lt;br&gt;
   =&amp;gt; Vue.js&lt;br&gt;
   =&amp;gt; Next.js&lt;br&gt;
   =&amp;gt; Nuxt.js&lt;br&gt;
   =&amp;gt; Ember.js&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Advantages of Frameworks&lt;/strong&gt;&lt;br&gt;
    --&amp;gt; Organized project structure&lt;br&gt;
    --&amp;gt; Faster application development&lt;br&gt;
    --&amp;gt; Built-in tools and features&lt;br&gt;
    --&amp;gt; Easier maintenance of large applications&lt;/p&gt;

&lt;p&gt;JavaScript libraries and frameworks help developers build modern web applications efficiently. Libraries provide specific functionalities that can be used when needed, while frameworks offer a complete structure for application development. Choosing between a library and a framework depends on the project's requirements, complexity, and development goals.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>javascript</category>
      <category>beginners</category>
      <category>frontend</category>
    </item>
    <item>
      <title>Interpreter vs Compiler: A Beginner-Friendly Guide</title>
      <dc:creator>Vidya</dc:creator>
      <pubDate>Wed, 03 Jun 2026 05:29:01 +0000</pubDate>
      <link>https://dev.to/vidya_cdd37fca763a53a10e2/interpreter-vs-compiler-a-beginner-friendly-guide-1cp6</link>
      <guid>https://dev.to/vidya_cdd37fca763a53a10e2/interpreter-vs-compiler-a-beginner-friendly-guide-1cp6</guid>
      <description>&lt;p&gt;When learning programming, you will often hear the terms Compiler and Interpreter. Both are used to convert human-readable source code into machine-readable code, but they work in different ways.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is a Compiler?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A compiler is a software program that translates the entire source code into machine code before the program is executed. Once the compilation is completed, the generated executable file can run directly without needing the source code again.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How a Compiler Works?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;=&amp;gt;  Reads the entire source code.&lt;br&gt;
=&amp;gt;  Checks for syntax and semantic errors.&lt;br&gt;
=&amp;gt;  Converts the code into machine code.&lt;br&gt;
=&amp;gt;  Generates an executable file.&lt;br&gt;
=&amp;gt;  Executes the program.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Advantages of a Compiler&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;--&amp;gt; Faster program execution.&lt;br&gt;
--&amp;gt; Errors are reported before execution.&lt;br&gt;
--&amp;gt; Optimized machine code improves performance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Disadvantages of a Compiler&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;=&amp;gt;  Compilation can take time for large programs.&lt;br&gt;
=&amp;gt;  The program must be recompiled after every code change.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Examples of Compiled Languages
C
C++
Go
Rust
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;What is an Interpreter?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;An interpreter is a software program that translates and executes source code line by line at runtime. It does not create a separate executable file.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How an Interpreter Works?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;=&amp;gt;  Reads one line of code.&lt;br&gt;
=&amp;gt;  Translates it into machine instructions.&lt;br&gt;
=&amp;gt;  Executes it immediately.&lt;br&gt;
=&amp;gt;  Moves to the next line.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Advantages of an Interpreter&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;--&amp;gt; Easy to test and debug code.&lt;br&gt;
--&amp;gt; No separate compilation step is required.&lt;br&gt;
--&amp;gt; Suitable for rapid development.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Disadvantages of an Interpreter&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;=&amp;gt;  Slower execution compared to compiled programs.&lt;br&gt;
=&amp;gt;  The code must be interpreted every time it runs.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Examples of Interpreted Languages
Python
JavaScript
Ruby
PHP
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Real-Life Example&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Imagine you want to translate an English book into Tamil:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Compiler Approach&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A translator converts the entire book first and then gives you the completed Tamil version. You can read it anytime without needing the translator again.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Interpreter Approach&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A translator reads one sentence, translates it, and explains it immediately. Then moves to the next sentence.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>beginners</category>
      <category>backend</category>
      <category>frontend</category>
    </item>
    <item>
      <title>Dependency Injection in Spring Boot</title>
      <dc:creator>Vidya</dc:creator>
      <pubDate>Tue, 02 Jun 2026 05:25:57 +0000</pubDate>
      <link>https://dev.to/vidya_cdd37fca763a53a10e2/dependency-injection-in-spring-boot-7jp</link>
      <guid>https://dev.to/vidya_cdd37fca763a53a10e2/dependency-injection-in-spring-boot-7jp</guid>
      <description>&lt;p&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Dependency Injection (DI) is a design pattern used to achieve loose coupling between classes. Instead of a class creating its own objects, the required objects (dependencies) are provided by an external container. In Spring Boot, the Spring Container automatically creates and injects objects into classes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is Dependency Injection?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Dependency Injection is a process where the Spring Framework provides the required object to a class instead of the class creating the object itself using the new keyword. This makes the application more flexible, maintainable, and easier to test.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Without Dependency Injection&lt;/strong&gt;&lt;br&gt;
public class Car {&lt;br&gt;
    Engine engine = new Engine(); // Object created manually&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;In this approach, the Car class is tightly coupled with the Engine class.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;With Dependency Injection&lt;/strong&gt;&lt;br&gt;
@Component&lt;br&gt;
public class Engine {&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;@Component&lt;br&gt;
public class Car {&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@Autowired
private Engine engine;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;Here, Spring creates the Engine object and injects it into the Car class automatically.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is @Autowired in Spring Boot?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;@Autowired is an annotation used for Dependency Injection in Spring.&lt;/p&gt;

&lt;p&gt;It tells the Spring Container:&lt;/p&gt;

&lt;p&gt;"This class needs an object of another class. Please create it and inject it automatically."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What happens here?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;=&amp;gt; Spring starts the application.&lt;br&gt;
=&amp;gt; It finds @Component on Engine.&lt;br&gt;
=&amp;gt; Spring creates an Engine object and stores it in the Spring Container.&lt;br&gt;
=&amp;gt; It finds @Autowired on engine.&lt;br&gt;
=&amp;gt; Spring injects the already created Engine object into the Car class.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Internally, it works like:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nc"&gt;Engine&lt;/span&gt; &lt;span class="n"&gt;engine&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Engine&lt;/span&gt;&lt;span class="o"&gt;();&lt;/span&gt;
&lt;span class="nc"&gt;Car&lt;/span&gt; &lt;span class="n"&gt;car&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Car&lt;/span&gt;&lt;span class="o"&gt;();&lt;/span&gt;
&lt;span class="n"&gt;car&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;engine&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;engine&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;--&amp;gt; But Spring does this automatically.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why Do We Use Dependency Injection?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;=&amp;gt; Reduces tight coupling between classes.&lt;br&gt;
=&amp;gt; Improves code maintainability.&lt;br&gt;
=&amp;gt; Makes unit testing easier.&lt;br&gt;
=&amp;gt; Promotes code reusability.&lt;br&gt;
=&amp;gt; Helps manage object creation automatically.&lt;/p&gt;

</description>
      <category>springboot</category>
      <category>backend</category>
      <category>frontend</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Auto Configuration in Spring Boot</title>
      <dc:creator>Vidya</dc:creator>
      <pubDate>Mon, 01 Jun 2026 05:36:07 +0000</pubDate>
      <link>https://dev.to/vidya_cdd37fca763a53a10e2/auto-configuration-in-spring-boot-11k</link>
      <guid>https://dev.to/vidya_cdd37fca763a53a10e2/auto-configuration-in-spring-boot-11k</guid>
      <description>&lt;p&gt;&lt;strong&gt;What is Auto Configuration in Spring Boot?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Auto Configuration is one of the most powerful features of Spring Boot. It automatically configures your application based on the dependencies available in the project. This reduces manual configuration and helps developers build applications faster.&lt;/p&gt;

&lt;p&gt;In traditional Spring applications, developers had to create many configuration classes and bean definitions manually. Spring Boot simplifies this process through Auto Configuration.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why Do We Use Auto Configuration?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;=&amp;gt; Reduces boilerplate configuration code.&lt;br&gt;
=&amp;gt; Speeds up application development.&lt;br&gt;
=&amp;gt; Minimizes manual setup.&lt;br&gt;
=&amp;gt; Provides sensible default configurations.&lt;br&gt;
=&amp;gt; Makes Spring applications easier to create and maintain.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How Auto Configuration Works?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When a Spring Boot application starts:&lt;br&gt;
       =&amp;gt; Spring Boot scans the dependencies in pom.xml.&lt;br&gt;
       =&amp;gt; It checks which libraries are available.&lt;br&gt;
       =&amp;gt; Based on those libraries, it automatically creates and   configures the necessary beans.&lt;br&gt;
       =&amp;gt; The application becomes ready to use with minimal configuration.&lt;/p&gt;

&lt;p&gt;The Auto Configuration feature is enabled by the @SpringBootApplication annotation.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nd"&gt;@SpringBootApplication&lt;/span&gt;
&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;MyApplication&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;static&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="o"&gt;[]&lt;/span&gt; &lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="nc"&gt;SpringApplication&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;MyApplication&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The @SpringBootApplication annotation internally includes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nd"&gt;@Configuration&lt;/span&gt;
&lt;span class="nd"&gt;@EnableAutoConfiguration&lt;/span&gt;
&lt;span class="nd"&gt;@ComponentScan&lt;/span&gt;

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

&lt;/div&gt;



&lt;p&gt;Here, @EnableAutoConfiguration is responsible for Auto Configuration.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Real-Life Example&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Think of Auto Configuration like a new smartphone.&lt;br&gt;
When you insert a SIM card:&lt;br&gt;
=&amp;gt; The phone automatically detects the network.&lt;br&gt;
=&amp;gt; Configures mobile settings.&lt;br&gt;
=&amp;gt; Enables calling and internet.&lt;br&gt;
      ---&amp;gt; You do not manually configure everything.&lt;/p&gt;

&lt;p&gt;Similarly, Spring Boot detects dependencies and automatically configures the required components.&lt;/p&gt;

</description>
      <category>springboot</category>
      <category>backend</category>
      <category>frontend</category>
      <category>programming</category>
    </item>
    <item>
      <title>Learn REST API Easily</title>
      <dc:creator>Vidya</dc:creator>
      <pubDate>Thu, 28 May 2026 06:10:07 +0000</pubDate>
      <link>https://dev.to/vidya_cdd37fca763a53a10e2/learn-rest-api-easily-19p1</link>
      <guid>https://dev.to/vidya_cdd37fca763a53a10e2/learn-rest-api-easily-19p1</guid>
      <description>&lt;p&gt;&lt;strong&gt;What is REST API?&lt;/strong&gt;&lt;br&gt;
  A REST API (Representational State Transfer Application Programming Interface) is a way for applications to communicate with each other using HTTP methods like GET, POST, PUT, and DELETE. It allows clients and servers to exchange data, usually in JSON format. Each resource is identified using a unique URL such as &lt;a href="http://localhost:8080/products" rel="noopener noreferrer"&gt;http://localhost:8080/products&lt;/a&gt;. REST APIs are widely used in web and mobile applications because they are simple, fast, and scalable.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When we used REST API?&lt;/strong&gt;&lt;br&gt;
  We use REST APIs when different applications need to communicate and share data with each other. They are commonly used to connect frontend applications with backend servers. REST APIs are also used in web and mobile applications to perform operations like creating, reading, updating, and deleting data. They help applications work efficiently across different platforms and technologies.&lt;/p&gt;

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

&lt;p&gt;Example:&lt;br&gt;
&lt;a href="http://localhost:8080/users" rel="noopener noreferrer"&gt;http://localhost:8080/users&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is a REST API endpoint used to manage user data from the server.&lt;/p&gt;

&lt;p&gt;localhost → Your local machine where the application runs&lt;br&gt;
8080 → Port number of the server&lt;br&gt;
/users → Resource that contains user information&lt;/p&gt;

&lt;p&gt;Operations:&lt;/p&gt;

&lt;p&gt;GET /users → Get all users&lt;br&gt;
GET /users/1 → Get user with ID 1&lt;br&gt;
POST /users → Add a new user&lt;br&gt;
PUT /users/1 → Update user details&lt;br&gt;
DELETE /users/1 → Delete user with ID 1&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Image Format:&lt;/strong&gt;&lt;/p&gt;

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

</description>
      <category>restapi</category>
      <category>backend</category>
      <category>frontend</category>
      <category>springboot</category>
    </item>
    <item>
      <title>API</title>
      <dc:creator>Vidya</dc:creator>
      <pubDate>Wed, 27 May 2026 07:38:26 +0000</pubDate>
      <link>https://dev.to/vidya_cdd37fca763a53a10e2/api-1ggf</link>
      <guid>https://dev.to/vidya_cdd37fca763a53a10e2/api-1ggf</guid>
      <description>&lt;p&gt;&lt;strong&gt;What is API?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;API stands for Application Programming Interface. It is a bridge that allows two applications to communicate and exchange data with each other. APIs are used to send requests and receive responses between frontend and backend applications. They help applications fetch, store, update, and delete data from the server or database. APIs are widely used in web applications, mobile applications, and cloud services. For example, a React frontend uses APIs to get data from a Spring Boot backend.&lt;/p&gt;

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

&lt;p&gt;=&amp;gt; React frontend&lt;br&gt;
=&amp;gt; Spring Boot backend&lt;br&gt;
=&amp;gt; MySQL database&lt;/p&gt;

&lt;p&gt;The frontend cannot directly access the database.&lt;br&gt;
So it sends a request through an API, and the backend returns the response.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Simple Flow&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Frontend → API → Backend → Database&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Real-Time Example&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Consider a food delivery app.&lt;br&gt;
=&amp;gt; The mobile app needs restaurant data&lt;br&gt;
=&amp;gt; The data is stored in the server/database&lt;br&gt;
=&amp;gt; The app requests data using an API&lt;br&gt;
=&amp;gt; The server sends the response&lt;br&gt;
---&amp;gt; So APIs help different applications communicate with each other.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why Do We Use API?&lt;/strong&gt;&lt;br&gt;
 &lt;strong&gt;1.Communication Between Applications&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;APIs allow different applications to communicate.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;br&gt;
React ↔ Spring Boot&lt;br&gt;
Mobile App ↔ Server&lt;br&gt;
Website ↔ Payment Gateway&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2.To Fetch Data&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;APIs are used to get data from the server or database.&lt;br&gt;
&lt;strong&gt;Example:&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;GET /products
   This returns all products.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;3. To Send Data&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;APIs are used to store data in the database.&lt;br&gt;
&lt;strong&gt;Example:&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;POST /products
       This adds a new product.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;4. To Update Data&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&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;PUT /products/1
         This updates the product with ID 1.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;5. To Delete Data&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example:&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;DELETE /products/1
          This deletes the product with ID 1.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>api</category>
      <category>springboot</category>
      <category>backend</category>
      <category>frontend</category>
    </item>
    <item>
      <title>Annotations in Spring Boot</title>
      <dc:creator>Vidya</dc:creator>
      <pubDate>Tue, 26 May 2026 06:00:28 +0000</pubDate>
      <link>https://dev.to/vidya_cdd37fca763a53a10e2/annotations-in-spring-boot-1a27</link>
      <guid>https://dev.to/vidya_cdd37fca763a53a10e2/annotations-in-spring-boot-1a27</guid>
      <description>&lt;p&gt;&lt;strong&gt;Common Spring Boot Annotations and Why We Use Them?&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;@SpringBootApplication**
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@SpringBootApplication
public class DemoApplication {
    public static void main(String[] args) {
        SpringApplication.run(DemoApplication.class, args);
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Why we use?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is the main annotation for Spring Boot application.&lt;/p&gt;

&lt;p&gt;It combines 3 annotations internally:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;@Configuration&lt;/li&gt;
&lt;li&gt;@EnableAutoConfiguration&lt;/li&gt;
&lt;li&gt;@ComponentScan&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Meaning:&lt;/strong&gt;&lt;br&gt;
=&amp;gt; Starts Spring Boot app&lt;br&gt;
=&amp;gt; Automatically configures project&lt;br&gt;
=&amp;gt; Scans classes like controller, service, repository&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. @RestController&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;@RestController
public class StudentController {

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

&lt;/div&gt;



&lt;p&gt;@RestController is used in Spring Boot to create REST APIs and send data directly to the client as an HTTP response, usually in JSON format.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why do we use it?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We use @RestController when we want to:&lt;/p&gt;

&lt;p&gt;=&amp;gt; send data to frontend applications&lt;br&gt;
=&amp;gt; create APIs&lt;br&gt;
=&amp;gt; return JSON/XML instead of HTML pages&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3.@Controller&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;@Controller is used to create a web controller in Spring MVC.&lt;/p&gt;

&lt;p&gt;It is mainly used to return:&lt;/p&gt;

&lt;p&gt;=&amp;gt; HTML pages&lt;br&gt;
=&amp;gt; JSP pages&lt;br&gt;
=&amp;gt; Thymeleaf templates&lt;br&gt;
instead of JSON data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why do we use @Controller?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We use @Controller when we want to:&lt;/p&gt;

&lt;p&gt;=&amp;gt; handle web requests&lt;br&gt;
=&amp;gt; return UI pages to the browser&lt;br&gt;
=&amp;gt; build traditional web applications&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example&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; @Controller
public class HomeController {

    @GetMapping("/home")
    public String home() {
        return "home";
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;4.@Service&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;@Service is used to mark a class as a service layer in a Spring Boot application.&lt;/p&gt;

&lt;p&gt;It contains the business logic of the application.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why do we use @Service?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We use @Service to:&lt;/p&gt;

&lt;p&gt;=&amp;gt; write business logic&lt;br&gt;
=&amp;gt; perform calculations&lt;br&gt;
=&amp;gt; validate data&lt;br&gt;
=&amp;gt; process application logic&lt;br&gt;
=&amp;gt; keep controller code clean&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example&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;@Service
public class StudentService {

    public String getMessage() {
        return "Welcome Student";
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;5. @Repository&lt;/strong&gt;&lt;br&gt;
@Repository is used to mark a class as a repository layer in a Spring Boot application.&lt;/p&gt;

&lt;p&gt;It is mainly used for database operations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why do we use @Repository?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;We use @Repository to:&lt;/p&gt;

&lt;p&gt;=&amp;gt; connect with the database&lt;br&gt;
=&amp;gt; save data&lt;br&gt;
=&amp;gt; fetch data&lt;br&gt;
=&amp;gt; update data&lt;br&gt;
=&amp;gt; delete data&lt;/p&gt;

&lt;p&gt;It acts as a bridge between the application and the database.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example&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;@Repository
public class StudentRepository {

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

&lt;/div&gt;



</description>
      <category>springboot</category>
      <category>java</category>
      <category>backend</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Spring vs Spring Boot – Complete Comparison</title>
      <dc:creator>Vidya</dc:creator>
      <pubDate>Tue, 12 May 2026 15:33:31 +0000</pubDate>
      <link>https://dev.to/vidya_cdd37fca763a53a10e2/spring-vs-spring-boot-complete-comparison-1ma5</link>
      <guid>https://dev.to/vidya_cdd37fca763a53a10e2/spring-vs-spring-boot-complete-comparison-1ma5</guid>
      <description>&lt;p&gt;&lt;strong&gt;What is Spring?&lt;/strong&gt;&lt;br&gt;
         =&amp;gt; Spring Framework is a Java framework used to build enterprise applications.&lt;br&gt;
=&amp;gt; It provides features like Dependency Injection (DI), IoC, database handling, security, and web development.&lt;br&gt;
=&amp;gt; In Spring, developers must configure many things manually using XML or Java configuration.&lt;br&gt;
=&amp;gt; It is flexible and powerful but requires more setup and coding.&lt;br&gt;
Spring is mainly used for large-scale Java applications.&lt;br&gt;
&lt;strong&gt;Example:&lt;/strong&gt; Creating web applications, banking systems, REST APIs, and microservices.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is Spring Boot?&lt;/strong&gt;&lt;br&gt;
          =&amp;gt; Spring Boot is built on top of Spring Framework.&lt;br&gt;
=&amp;gt; It reduces configuration work and makes development faster and easier.&lt;br&gt;
=&amp;gt; Spring Boot provides auto-configuration, embedded servers, and starter dependencies.&lt;br&gt;
=&amp;gt; You can run applications directly without deploying WAR files manually.&lt;br&gt;
=&amp;gt; It follows “convention over configuration,” so less code is needed.&lt;br&gt;
&lt;strong&gt;Example:&lt;/strong&gt; Quickly creating REST APIs, backend services, and microservice applications.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why do we use Spring Boot Framework in Java instead of others?&lt;/strong&gt;&lt;br&gt;
               =&amp;gt; Spring Boot makes Java development simple, fast, and production-ready.&lt;br&gt;
=&amp;gt; It has built-in support for REST APIs, databases, security, and microservices.&lt;br&gt;
=&amp;gt; Embedded servers like Tomcat help run applications easily.&lt;br&gt;
=&amp;gt; Large community support and many companies use it in real projects.&lt;br&gt;
=&amp;gt; It reduces boilerplate code and saves development time.&lt;br&gt;
=&amp;gt; Compared to many frameworks, Spring Boot is easier for creating scalable enterprise applications quickly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Image Format&lt;/strong&gt;&lt;/p&gt;

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

</description>
      <category>java</category>
      <category>springboot</category>
      <category>backend</category>
      <category>spring</category>
    </item>
  </channel>
</rss>
