<?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: SATHISHKUMAR R</title>
    <description>The latest articles on DEV Community by SATHISHKUMAR R (@sathishkumar_0506).</description>
    <link>https://dev.to/sathishkumar_0506</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%2F4127206%2F0ee8ffc3-8c92-4db0-b93f-2a7097519fc9.jpeg</url>
      <title>DEV Community: SATHISHKUMAR R</title>
      <link>https://dev.to/sathishkumar_0506</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sathishkumar_0506"/>
    <language>en</language>
    <item>
      <title>What is useContext in React?</title>
      <dc:creator>SATHISHKUMAR R</dc:creator>
      <pubDate>Wed, 04 Nov 2026 07:33:25 +0000</pubDate>
      <link>https://dev.to/sathishkumar_0506/what-is-usecontext-in-react-41ng</link>
      <guid>https://dev.to/sathishkumar_0506/what-is-usecontext-in-react-41ng</guid>
      <description>&lt;p&gt;useContext is a React Hook used to share data between components without passing props manually through every intermediate component.&lt;br&gt;
useContext helps us avoid Props Drilling by sharing data directly with the components that need it.&lt;/p&gt;

&lt;p&gt;Imagine you have 3 components:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;App (Parent)&lt;/li&gt;
&lt;li&gt;Profile (Child)&lt;/li&gt;
&lt;li&gt;User (Grandchild)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Without useContext, we need to pass data through every component using props.&lt;/p&gt;

&lt;p&gt;With useContext, the User component can directly access the shared data.&lt;/p&gt;

&lt;p&gt;Example using useContext:&lt;/p&gt;

&lt;p&gt;We will create three files.&lt;/p&gt;

&lt;p&gt;Step 1: UserContext.jsx&lt;br&gt;
Create Context:&lt;/p&gt;

&lt;p&gt;import { createContext } from 'react';&lt;/p&gt;

&lt;p&gt;export const UserContext = createContext();&lt;/p&gt;

&lt;p&gt;Step 2: App.jsx&lt;br&gt;
Provide data to child components.&lt;/p&gt;

&lt;p&gt;import { UserContext } from './UserContext';&lt;br&gt;
import Profile from './Profile';&lt;/p&gt;

&lt;p&gt;function App() {&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const name = "Sathish";

return (
    &amp;lt;UserContext.Provider value={name}&amp;gt;
        &amp;lt;Profile /&amp;gt;
    &amp;lt;/UserContext.Provider&amp;gt;
);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

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

&lt;p&gt;export default App;&lt;/p&gt;

&lt;p&gt;Step 3: Profile.jsx&lt;/p&gt;

&lt;p&gt;import User from './User';&lt;/p&gt;

&lt;p&gt;function Profile() {&lt;br&gt;
    return ;&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;export default Profile;&lt;/p&gt;

&lt;p&gt;Step 4: User.jsx&lt;br&gt;
Access the data directly.&lt;/p&gt;

&lt;p&gt;import { useContext } from 'react';&lt;br&gt;
import { UserContext } from './UserContext';&lt;/p&gt;

&lt;p&gt;function User() {&lt;/p&gt;

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

return &amp;lt;h1&amp;gt;Hello {name}&amp;lt;/h1&amp;gt;;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

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

&lt;p&gt;export default User;&lt;/p&gt;

&lt;p&gt;Output:&lt;br&gt;
Hello Sathish ❤️&lt;/p&gt;

</description>
      <category>myblog</category>
      <category>programming</category>
      <category>frontend</category>
      <category>react</category>
    </item>
    <item>
      <title>What is Props Drilling in React?</title>
      <dc:creator>SATHISHKUMAR R</dc:creator>
      <pubDate>Wed, 04 Nov 2026 07:27:15 +0000</pubDate>
      <link>https://dev.to/sathishkumar_0506/what-is-props-drilling-in-react-59lb</link>
      <guid>https://dev.to/sathishkumar_0506/what-is-props-drilling-in-react-59lb</guid>
      <description>&lt;p&gt;Props Drilling is the process of passing data from a parent component to a deeply nested child component through multiple intermediate components using props.&lt;br&gt;
Passing props through multiple components to reach the component that actually needs the data is called Props Drilling.&lt;/p&gt;

&lt;p&gt;Example of Props Drilling:&lt;/p&gt;

&lt;p&gt;Imagine we have 3 components:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;App (Parent)&lt;/li&gt;
&lt;li&gt;Profile (Child)&lt;/li&gt;
&lt;li&gt;User (Grandchild)&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;App.jsx (Parent)&lt;/p&gt;

&lt;p&gt;function App() {&lt;br&gt;
    const name = "Sathish";&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;return &amp;lt;Profile name={name} /&amp;gt;;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

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

&lt;p&gt;export default App;&lt;/p&gt;

&lt;p&gt;Profile.jsx (Child)&lt;/p&gt;

&lt;p&gt;function Profile({ name }) {&lt;br&gt;
    return ;&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;export default Profile;&lt;/p&gt;

&lt;p&gt;User.jsx (Grandchild)&lt;/p&gt;

&lt;p&gt;function User({ name }) {&lt;br&gt;
    return &lt;/p&gt;
&lt;h1&gt;Hello {name}&lt;/h1&gt;;&lt;br&gt;
}

&lt;p&gt;export default User;&lt;/p&gt;

&lt;p&gt;Output:&lt;/p&gt;

&lt;p&gt;Hello Sathish&lt;/p&gt;

&lt;p&gt;How does it work?&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;App component creates the name variable.&lt;/li&gt;
&lt;li&gt;App passes name to Profile using props.&lt;/li&gt;
&lt;li&gt;Profile receives name.&lt;/li&gt;
&lt;li&gt;Profile passes name to User.&lt;/li&gt;
&lt;li&gt;User displays the name.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Disadvantages of Props Drilling:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Passing props through unnecessary components.&lt;/li&gt;
&lt;li&gt;Makes code difficult to maintain.&lt;/li&gt;
&lt;li&gt;Increases complexity when many components are involved.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;How to Avoid Props Drilling?&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Context API – Share data between components without passing props through every level.&lt;/li&gt;
&lt;li&gt;Redux – Manage application-wide state.&lt;/li&gt;
&lt;li&gt;Zustand – Another state management library.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Props drilling is not always bad. For a small application, normal props are perfectly fine.&lt;/p&gt;

</description>
      <category>myblog</category>
      <category>programming</category>
      <category>frontend</category>
      <category>react</category>
    </item>
    <item>
      <title>What is Destructuring in React</title>
      <dc:creator>SATHISHKUMAR R</dc:creator>
      <pubDate>Wed, 04 Nov 2026 07:19:54 +0000</pubDate>
      <link>https://dev.to/sathishkumar_0506/what-is-destructuring-in-react-2hno</link>
      <guid>https://dev.to/sathishkumar_0506/what-is-destructuring-in-react-2hno</guid>
      <description>&lt;p&gt;In React, we commonly use destructuring in two places:&lt;/p&gt;

&lt;p&gt;Props Destructuring:&lt;/p&gt;

&lt;p&gt;Props are used to pass data from parent components to child components.&lt;/p&gt;

&lt;p&gt;Without destructuring:&lt;/p&gt;

&lt;p&gt;App.jsx (Parent)&lt;/p&gt;

&lt;p&gt;function App() {&lt;br&gt;
    return ;&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;export default App;&lt;/p&gt;

&lt;p&gt;Student.jsx (Child)&lt;/p&gt;

&lt;p&gt;function Student(props) {&lt;br&gt;
    return (&lt;br&gt;
        &lt;/p&gt;
&lt;h1&gt;
&lt;br&gt;
            My name is {props.name}&lt;br&gt;
            My age is {props.age}&lt;br&gt;
        &lt;/h1&gt;
&lt;br&gt;
    );&lt;br&gt;
}

&lt;p&gt;export default Student;&lt;/p&gt;

&lt;p&gt;With destructuring:&lt;/p&gt;

&lt;p&gt;Student.jsx&lt;/p&gt;

&lt;p&gt;function Student({ name, age }) {&lt;br&gt;
    return (&lt;br&gt;
        &lt;/p&gt;
&lt;h1&gt;
&lt;br&gt;
            My name is {name}&lt;br&gt;
            My age is {age}&lt;br&gt;
        &lt;/h1&gt;
&lt;br&gt;
    );&lt;br&gt;
}

&lt;p&gt;export default Student;&lt;/p&gt;

&lt;p&gt;Both methods produce the same output:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;name extracts the name property.&lt;/li&gt;
&lt;li&gt;age extracts the age property.&lt;/li&gt;
&lt;li&gt;{ name, age } is object destructuring.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;useState Destructuring:&lt;/p&gt;

&lt;p&gt;This is another important example in React.&lt;/p&gt;

&lt;p&gt;import { useState } from 'react';&lt;/p&gt;

&lt;p&gt;function App() {&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const [count, setCount] = useState(0);

return (
    &amp;lt;div&amp;gt;
        &amp;lt;h1&amp;gt;Count: {count}&amp;lt;/h1&amp;gt;

        &amp;lt;button onClick={() =&amp;gt; setCount(count + 1)}&amp;gt;
            Click Me
        &amp;lt;/button&amp;gt;
    &amp;lt;/div&amp;gt;
);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

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

&lt;p&gt;export default App;&lt;/p&gt;

&lt;p&gt;Here:&lt;/p&gt;

&lt;p&gt;const [count, setCount] = useState(0);&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;count → Current state value.&lt;/li&gt;
&lt;li&gt;setCount → Function to update the state.&lt;/li&gt;
&lt;li&gt;useState(0) → Initial value is 0.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Why square brackets []?&lt;/p&gt;

&lt;p&gt;Because useState() returns an array containing two values. We use array destructuring to extract them.&lt;/p&gt;

&lt;p&gt;JavaScript vs React Destructuring:&lt;/p&gt;

&lt;p&gt;JavaScript                              React&lt;br&gt;
Extract values from arrays    Extract values from useState()&lt;br&gt;
Extract properties from objects   Extract properties from props&lt;br&gt;
Uses [] and {}                         Uses [] and {}&lt;br&gt;
General JavaScript feature    Uses JavaScript destructuring&lt;/p&gt;

</description>
      <category>myblog</category>
      <category>programming</category>
      <category>frontend</category>
      <category>react</category>
    </item>
    <item>
      <title>What is Destructuring in JavaScript?</title>
      <dc:creator>SATHISHKUMAR R</dc:creator>
      <pubDate>Wed, 04 Nov 2026 07:14:04 +0000</pubDate>
      <link>https://dev.to/sathishkumar_0506/what-is-destructuring-in-javascript-5dij</link>
      <guid>https://dev.to/sathishkumar_0506/what-is-destructuring-in-javascript-5dij</guid>
      <description>&lt;p&gt;Destructuring is an ES6 feature in JavaScript. It allows us to extract values from arrays or objects and store them in separate variables easily.&lt;br&gt;
Destructuring means taking values from an array or object and assigning them to variables.&lt;/p&gt;

&lt;p&gt;There are two main types:&lt;/p&gt;

&lt;p&gt;Array Destructuring:&lt;/p&gt;

&lt;p&gt;Array destructuring uses square brackets [].&lt;/p&gt;

&lt;p&gt;Without destructuring:&lt;/p&gt;

&lt;p&gt;let fruits = ["Apple", "Mango", "Orange"];&lt;/p&gt;

&lt;p&gt;let a = fruits[0];&lt;br&gt;
let b = fruits[1];&lt;br&gt;
let c = fruits[2];&lt;/p&gt;

&lt;p&gt;console.log(a);&lt;br&gt;
console.log(b);&lt;br&gt;
console.log(c);&lt;/p&gt;

&lt;p&gt;With destructuring:&lt;/p&gt;

&lt;p&gt;let fruits = ["Apple", "Mango", "Orange"];&lt;/p&gt;

&lt;p&gt;let [a, b, c] = fruits;&lt;/p&gt;

&lt;p&gt;console.log(a);&lt;br&gt;
console.log(b);&lt;br&gt;
console.log(c);&lt;/p&gt;

&lt;p&gt;Output:&lt;/p&gt;

&lt;p&gt;Apple&lt;br&gt;
Mango&lt;br&gt;
Orange&lt;/p&gt;

&lt;p&gt;Object Destructuring:&lt;/p&gt;

&lt;p&gt;Object destructuring uses curly brackets {}.&lt;/p&gt;

&lt;p&gt;Without destructuring:&lt;/p&gt;

&lt;p&gt;let student = {&lt;br&gt;
    name: "Sathish",&lt;br&gt;
    age: 23,&lt;br&gt;
    city: "Chennai"&lt;br&gt;
};&lt;/p&gt;

&lt;p&gt;let name = student.name;&lt;br&gt;
let age = student.age;&lt;/p&gt;

&lt;p&gt;console.log(name);&lt;br&gt;
console.log(age);&lt;/p&gt;

&lt;p&gt;With destructuring:&lt;/p&gt;

&lt;p&gt;let student = {&lt;br&gt;
    name: "Sathish",&lt;br&gt;
    age: 23,&lt;br&gt;
    city: "Chennai"&lt;br&gt;
};&lt;/p&gt;

&lt;p&gt;let { name, age, city } = student;&lt;/p&gt;

&lt;p&gt;console.log(name);&lt;br&gt;
console.log(age);&lt;br&gt;
console.log(city);&lt;/p&gt;

&lt;p&gt;Output:&lt;/p&gt;

&lt;p&gt;Sathish&lt;br&gt;
23&lt;br&gt;
Chennai&lt;/p&gt;

</description>
      <category>myblog</category>
      <category>programming</category>
      <category>frontend</category>
      <category>react</category>
    </item>
    <item>
      <title>What are Props in React?</title>
      <dc:creator>SATHISHKUMAR R</dc:creator>
      <pubDate>Wed, 04 Nov 2026 07:09:45 +0000</pubDate>
      <link>https://dev.to/sathishkumar_0506/probs-in-reactwhat-are-props-in-react-756</link>
      <guid>https://dev.to/sathishkumar_0506/probs-in-reactwhat-are-props-in-react-756</guid>
      <description>&lt;p&gt;Props means Properties.&lt;/p&gt;

&lt;p&gt;Props are used to pass data from one component to another component (Parent to Child).&lt;br&gt;
Props help us share data between React components.&lt;/p&gt;

&lt;p&gt;Why do we use Props?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;To pass data between components.&lt;/li&gt;
&lt;li&gt;To reuse components.&lt;/li&gt;
&lt;li&gt;To make components dynamic.&lt;/li&gt;
&lt;li&gt;To display different values using the same component.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example of Props:&lt;/p&gt;

&lt;p&gt;Parent Component (App.jsx)&lt;/p&gt;

&lt;p&gt;import Student from './Student';&lt;/p&gt;

&lt;p&gt;function App() {&lt;br&gt;
    return (&lt;br&gt;
        &lt;/p&gt;
&lt;br&gt;
            &lt;br&gt;
            &lt;br&gt;
            &lt;br&gt;
        &lt;br&gt;
    );&lt;br&gt;
}

&lt;p&gt;export default App;&lt;/p&gt;

&lt;p&gt;Child Component (Student.jsx)&lt;br&gt;
function Student(props) {&lt;br&gt;
    return (&lt;br&gt;
        &lt;/p&gt;
&lt;h1&gt;Hello {props.name}&lt;/h1&gt;
&lt;br&gt;
    );&lt;br&gt;
}

&lt;p&gt;export default Student;&lt;/p&gt;

&lt;p&gt;Output:&lt;br&gt;
Hello Sathish&lt;br&gt;
Hello Kumar&lt;br&gt;
Hello Ragul&lt;/p&gt;

&lt;p&gt;Here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Student is the child component.&lt;/li&gt;
&lt;li&gt;App is the parent component.&lt;/li&gt;
&lt;li&gt;name is the prop.&lt;/li&gt;
&lt;li&gt;props.name receives the value.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Props using Destructuring:&lt;br&gt;
We can also write props using destructuring.&lt;/p&gt;

&lt;p&gt;function Student({ name }) {&lt;br&gt;
    return (&lt;br&gt;
        &lt;/p&gt;
&lt;h1&gt;Hello {name}&lt;/h1&gt;
&lt;br&gt;
    );&lt;br&gt;
}

&lt;p&gt;Rules of Props:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Props are passed from parent to child.&lt;/li&gt;
&lt;li&gt;Props are read-only.&lt;/li&gt;
&lt;li&gt;Child components cannot directly change their props.&lt;/li&gt;
&lt;li&gt;Props can contain strings, numbers, arrays, objects and functions.&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>myblog</category>
      <category>programming</category>
      <category>frontend</category>
      <category>react</category>
    </item>
    <item>
      <title>What is a Cleanup Function in React?</title>
      <dc:creator>SATHISHKUMAR R</dc:creator>
      <pubDate>Wed, 04 Nov 2026 07:04:57 +0000</pubDate>
      <link>https://dev.to/sathishkumar_0506/what-is-a-cleanup-function-in-react-2gl5</link>
      <guid>https://dev.to/sathishkumar_0506/what-is-a-cleanup-function-in-react-2gl5</guid>
      <description>&lt;p&gt;A Cleanup Function is a function inside useEffect that cleans up or stops previous operations when they are no longer needed.&lt;br&gt;
Cleanup function helps us stop timers, remove event listeners and avoid unnecessary operations.&lt;/p&gt;

&lt;p&gt;Syntax&lt;br&gt;
useEffect(() =&amp;gt; {&lt;/p&gt;

&lt;p&gt;return () =&amp;gt; {&lt;br&gt;
    };&lt;/p&gt;

&lt;p&gt;}, []);&lt;/p&gt;

&lt;p&gt;Here, return () =&amp;gt; {} is the cleanup function.&lt;/p&gt;

&lt;p&gt;When does Cleanup Function run?&lt;/p&gt;

&lt;p&gt;There are 3 important situations:&lt;/p&gt;

&lt;p&gt;Unmounting: When a component is removed from the screen.&lt;br&gt;
Updating dependencies: Before the effect runs again because a dependency changed.&lt;br&gt;
Development Strict Mode: React may run an extra setup and cleanup cycle to check your effect.&lt;br&gt;
Example:&lt;br&gt;
 setInterval&lt;/p&gt;

&lt;p&gt;import { useEffect } from 'react';&lt;/p&gt;

&lt;p&gt;function App() {&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;useEffect(() =&amp;gt; {

    const timer = setInterval(() =&amp;gt; {
        console.log("Hello React");
    }, 1000);

    return () =&amp;gt; {
        clearInterval(timer);
        console.log("Timer Stopped");
    };

}, []);

return &amp;lt;h1&amp;gt;Hello!&amp;lt;/h1&amp;gt;;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

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

&lt;p&gt;export default App;&lt;/p&gt;

&lt;p&gt;Step-by-step explanation:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Component mounts.&lt;/li&gt;
&lt;li&gt;useEffect runs.&lt;/li&gt;
&lt;li&gt;setInterval starts.&lt;/li&gt;
&lt;li&gt;Every 1 second, "Hello React" prints.&lt;/li&gt;
&lt;li&gt;Component unmounts.&lt;/li&gt;
&lt;li&gt;Cleanup function runs.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;clearInterval(timer) stops the timer.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Example:&lt;br&gt;
Event Listener:&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;useEffect(() =&amp;gt; {&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function handleClick() {
    console.log("Clicked!");
}

window.addEventListener("click", handleClick);

return () =&amp;gt; {
    window.removeEventListener("click", handleClick);
};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;}, []);&lt;/p&gt;

&lt;p&gt;Why cleanup?&lt;/p&gt;

&lt;p&gt;Without cleanup, the event listener may remain active even after the component is removed.&lt;/p&gt;

</description>
      <category>myblog</category>
      <category>programming</category>
      <category>frontend</category>
      <category>react</category>
    </item>
    <item>
      <title>What is Rendering in React?</title>
      <dc:creator>SATHISHKUMAR R</dc:creator>
      <pubDate>Wed, 04 Nov 2026 06:57:51 +0000</pubDate>
      <link>https://dev.to/sathishkumar_0506/what-is-rendering-in-react-b81</link>
      <guid>https://dev.to/sathishkumar_0506/what-is-rendering-in-react-b81</guid>
      <description>&lt;p&gt;Rendering means displaying the UI (User Interface) based on the component's JSX.&lt;br&gt;
Rendering means React prepares what should appear on the screen.&lt;/p&gt;

&lt;p&gt;Example of Rendering:&lt;/p&gt;

&lt;p&gt;function App() {&lt;br&gt;
    return (&lt;br&gt;
        &lt;/p&gt;
&lt;br&gt;
            &lt;h1&gt;Hello React!&lt;/h1&gt;
&lt;br&gt;
            &lt;p&gt;Welcome to my website.&lt;/p&gt;
&lt;br&gt;
        &lt;br&gt;
    );&lt;br&gt;
}

&lt;p&gt;export default App;&lt;/p&gt;

&lt;p&gt;Output:&lt;/p&gt;

&lt;p&gt;Hello React!&lt;br&gt;
Welcome to my website.&lt;/p&gt;

&lt;p&gt;React renders this JSX and displays it in the browser.&lt;/p&gt;

&lt;p&gt;When does Rendering happen?&lt;/p&gt;

&lt;p&gt;There are two main situations:&lt;/p&gt;

&lt;h1&gt;
  
  
  Initial Render: When a component appears on the screen for the first time.
&lt;/h1&gt;

&lt;h1&gt;
  
  
  Re-render: When state or props change and React needs to update the UI.
&lt;/h1&gt;

&lt;h1&gt;
  
  
  Example Using useState:
&lt;/h1&gt;

&lt;p&gt;import { useState } from 'react';&lt;/p&gt;

&lt;p&gt;function App() {&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const [count, setCount] = useState(0);

return (
    &amp;lt;div&amp;gt;
        &amp;lt;h1&amp;gt;Count: {count}&amp;lt;/h1&amp;gt;

        &amp;lt;button onClick={() =&amp;gt; setCount(count + 1)}&amp;gt;
            Click Me
        &amp;lt;/button&amp;gt;
    &amp;lt;/div&amp;gt;
);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

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

&lt;p&gt;export default App;&lt;/p&gt;

&lt;p&gt;Output:&lt;/p&gt;

&lt;p&gt;Count: 13&lt;/p&gt;

&lt;p&gt;Click MeTry clicking the button. The count changes because React re-renders the component.&lt;/p&gt;

&lt;p&gt;Step-by-step:&lt;/p&gt;

&lt;h1&gt;
  
  
  Initially, count = 0.
&lt;/h1&gt;

&lt;h1&gt;
  
  
  React renders the component.
&lt;/h1&gt;

&lt;h1&gt;
  
  
  You click the button.
&lt;/h1&gt;

&lt;h1&gt;
  
  
  setCount() updates the state.
&lt;/h1&gt;

&lt;h1&gt;
  
  
  React renders the component again.
&lt;/h1&gt;

&lt;h1&gt;
  
  
  Updated count appears on the screen.
&lt;/h1&gt;

</description>
      <category>myblog</category>
      <category>programming</category>
      <category>react</category>
      <category>frontend</category>
    </item>
    <item>
      <title>What is Unmounting in React?</title>
      <dc:creator>SATHISHKUMAR R</dc:creator>
      <pubDate>Wed, 04 Nov 2026 06:50:34 +0000</pubDate>
      <link>https://dev.to/sathishkumar_0506/what-is-unmounting-in-react-3d09</link>
      <guid>https://dev.to/sathishkumar_0506/what-is-unmounting-in-react-3d09</guid>
      <description>&lt;p&gt;Unmounting is the process of removing a component from the screen.&lt;br&gt;
When a React component is removed from the UI, it is called Unmounting.&lt;/p&gt;

&lt;p&gt;Unmounting is useful for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Clearing timers (setInterval, setTimeout).&lt;/li&gt;
&lt;li&gt;Removing event listeners.&lt;/li&gt;
&lt;li&gt;Cleaning up subscriptions.&lt;/li&gt;
&lt;li&gt;Preventing unnecessary background operations.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example using useEffect:&lt;/p&gt;

&lt;p&gt;import React, { useEffect, useState } from 'react';&lt;/p&gt;

&lt;p&gt;function App() {&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const [show, setShow] = useState(true);

return (
    &amp;lt;div&amp;gt;
        &amp;lt;button onClick={() =&amp;gt; setShow(!show)}&amp;gt;
            Show / Hide
        &amp;lt;/button&amp;gt;

        {show &amp;amp;&amp;amp; &amp;lt;Child /&amp;gt;}
    &amp;lt;/div&amp;gt;
);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

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

&lt;p&gt;function Child() {&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;useEffect(() =&amp;gt; {
    console.log("Component Mounted");

    return () =&amp;gt; {
        console.log("Component Unmounted");
    };

}, []);

return &amp;lt;h1&amp;gt;Hello React!&amp;lt;/h1&amp;gt;;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

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

&lt;p&gt;export default App;&lt;/p&gt;

&lt;p&gt;How does it work?&lt;/p&gt;

&lt;p&gt;Step 1: Initially, show = true.&lt;/p&gt;

&lt;p&gt;Output:&lt;/p&gt;

&lt;p&gt;Hello React!&lt;br&gt;
Component Mounted&lt;/p&gt;

&lt;p&gt;Click the Hide button:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;show becomes false.&lt;/li&gt;
&lt;li&gt;The Child component is removed from the screen.&lt;/li&gt;
&lt;li&gt;Cleanup function executes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Console:&lt;br&gt;
Component Unmounted&lt;/p&gt;

&lt;p&gt;Click the Show button again:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;show becomes true.&lt;/li&gt;
&lt;li&gt;Child component mounts again.&lt;/li&gt;
&lt;li&gt;Mounting effect runs again.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Cleanup Function:&lt;/p&gt;

&lt;p&gt;useEffect(() =&amp;gt; {&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;console.log("Mounted");

return () =&amp;gt; {
    console.log("Unmounted");
};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;}, []);&lt;/p&gt;

&lt;p&gt;The return function is called the Cleanup Function:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;When the component unmounts.&lt;/li&gt;
&lt;li&gt;Before the effect runs again when its dependencies change.&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>myblog</category>
      <category>programming</category>
      <category>frontend</category>
      <category>react</category>
    </item>
    <item>
      <title>What is Mounting in React?</title>
      <dc:creator>SATHISHKUMAR R</dc:creator>
      <pubDate>Wed, 04 Nov 2026 06:44:49 +0000</pubDate>
      <link>https://dev.to/sathishkumar_0506/what-is-mounting-in-react-3777</link>
      <guid>https://dev.to/sathishkumar_0506/what-is-mounting-in-react-3777</guid>
      <description>&lt;p&gt;Mounting is the first phase of a React component's lifecycle.&lt;br&gt;
When a component is created and displayed on the screen for the first time, it is called Mounting.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Mounting steps&lt;/li&gt;
&lt;li&gt;Component Function Runs – React executes the component.&lt;/li&gt;
&lt;li&gt;DOM Creation – React prepares the UI.&lt;/li&gt;
&lt;li&gt;DOM Update – React displays the UI on the screen.&lt;/li&gt;
&lt;li&gt;useEffect Runs – The effect runs after the component is displayed.&lt;/li&gt;
&lt;/ol&gt;

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

&lt;p&gt;import React, { useEffect } from 'react';&lt;/p&gt;

&lt;p&gt;function App() {&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;useEffect(() =&amp;gt; {
    console.log("Component Mounted");
}, []);

return (
    &amp;lt;h1&amp;gt;Hello React!&amp;lt;/h1&amp;gt;
);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

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

&lt;p&gt;export default App;&lt;/p&gt;

&lt;p&gt;Output:&lt;/p&gt;

&lt;p&gt;Hello React!&lt;/p&gt;

&lt;p&gt;Console:&lt;/p&gt;

&lt;p&gt;Component Mounted&lt;/p&gt;

</description>
      <category>programming</category>
      <category>frontend</category>
      <category>react</category>
      <category>myblog</category>
    </item>
    <item>
      <title>What is Axios in React?</title>
      <dc:creator>SATHISHKUMAR R</dc:creator>
      <pubDate>Mon, 02 Nov 2026 09:56:08 +0000</pubDate>
      <link>https://dev.to/sathishkumar_0506/what-is-axios-in-react-13gk</link>
      <guid>https://dev.to/sathishkumar_0506/what-is-axios-in-react-13gk</guid>
      <description>&lt;p&gt;Axios is a JavaScript library used to send HTTP requests from the frontend to the backend and communicate with APIs.&lt;/p&gt;

&lt;p&gt;We commonly use Axios to:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;GET – Fetch data from an API.&lt;/li&gt;
&lt;li&gt;POST – Send new data to an API.&lt;/li&gt;
&lt;li&gt;PUT – Update existing data.&lt;/li&gt;
&lt;li&gt;DELETE – Delete data from an API.&lt;/li&gt;
&lt;li&gt;How to install Axios :&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Open your VS Code terminal:&lt;/p&gt;

&lt;p&gt;npm install axios&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Axios GET example:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Let's fetch user data from an API.&lt;/p&gt;

&lt;p&gt;import React, { useEffect, useState } from 'react';&lt;br&gt;
import axios from 'axios';&lt;/p&gt;

&lt;p&gt;function App() {&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const [users, setUsers] = useState([]);

useEffect(() =&amp;gt; {

    axios.get('https://jsonplaceholder.typicode.com/users')
        .then((response) =&amp;gt; {
            setUsers(response.data);
        })
        .catch((error) =&amp;gt; {
            console.log(error);
        });

}, []);

return (
    &amp;lt;div&amp;gt;
        &amp;lt;h1&amp;gt;User Details&amp;lt;/h1&amp;gt;

        {users.map((user) =&amp;gt; (
            &amp;lt;p key={user.id}&amp;gt;{user.name}&amp;lt;/p&amp;gt;
        ))}
    &amp;lt;/div&amp;gt;
);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

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

&lt;p&gt;export default App;&lt;/p&gt;

&lt;p&gt;Explanation:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;useEffect() – Runs the API request after the component mounts.&lt;/li&gt;
&lt;li&gt;axios.get() – Fetches data from the API.&lt;/li&gt;
&lt;li&gt;then() – Handles successful responses.&lt;/li&gt;
&lt;li&gt;response.data – Contains the API response data.&lt;/li&gt;
&lt;li&gt;catch() – Handles errors.&lt;/li&gt;
&lt;li&gt;setUsers() – Stores the fetched data in state.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Four Axios methods:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Method  Purpose&lt;br&gt;
GET Read data&lt;br&gt;
POST    Create data&lt;br&gt;
PUT Update data&lt;br&gt;
DELETE  Delete data&lt;/p&gt;

</description>
      <category>programming</category>
      <category>frontend</category>
      <category>javascript</category>
      <category>react</category>
    </item>
    <item>
      <title>What is useEffect in React?</title>
      <dc:creator>SATHISHKUMAR R</dc:creator>
      <pubDate>Mon, 02 Nov 2026 09:50:40 +0000</pubDate>
      <link>https://dev.to/sathishkumar_0506/what-is-useeffect-in-react-553d</link>
      <guid>https://dev.to/sathishkumar_0506/what-is-useeffect-in-react-553d</guid>
      <description>&lt;p&gt;useEffect is a React Hook used to perform side effects in a functional component.&lt;/p&gt;

&lt;p&gt;It is commonly used for:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Fetching API data.&lt;/li&gt;
&lt;li&gt;Updating the document title.&lt;/li&gt;
&lt;li&gt;Using timers (setTimeout, setInterval).&lt;/li&gt;
&lt;li&gt;Adding event listeners.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Running code when a component loads or when state changes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;useEffect syntax:&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;import { useEffect } from 'react';&lt;/p&gt;

&lt;p&gt;useEffect(() =&amp;gt; {&lt;/p&gt;

&lt;p&gt;}, []);&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Example: useEffect:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;import React, { useState, useEffect } from 'react';&lt;/p&gt;

&lt;p&gt;function App() {&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const [count, setCount] = useState(0);

useEffect(() =&amp;gt; {
    console.log("Component Loaded");
}, []);

return (
    &amp;lt;div&amp;gt;
        &amp;lt;h1&amp;gt;Count: {count}&amp;lt;/h1&amp;gt;

        &amp;lt;button onClick={() =&amp;gt; setCount(count + 1)}&amp;gt;
            Click Me
        &amp;lt;/button&amp;gt;
    &amp;lt;/div&amp;gt;
);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

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

&lt;p&gt;export default App;&lt;/p&gt;

&lt;p&gt;Output:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;When the component loads → Component Loaded&lt;/li&gt;
&lt;li&gt;When you click the button → Count increases.&lt;/li&gt;
&lt;li&gt;The effect does not run again because the dependency array is empty.&lt;/li&gt;
&lt;li&gt;Three types of useEffect:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Type 1: Without dependency array:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;useEffect(() =&amp;gt; {
console.log("Runs after every render");
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;});&lt;/p&gt;

&lt;p&gt;Runs after every render.&lt;/p&gt;

&lt;p&gt;Type 2: Empty dependency array :&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;useEffect(() =&amp;gt; {
console.log("Runs after initial mount");
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;}, []);&lt;/p&gt;

&lt;p&gt;Runs after the component mounts (in development Strict Mode, React may run an extra setup cycle).&lt;/p&gt;

&lt;p&gt;Type 3: With dependency:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;useEffect(() =&amp;gt; {
console.log("Count changed");
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;}, [count]);&lt;/p&gt;

&lt;p&gt;Runs when count changes.&lt;/p&gt;

</description>
      <category>myblog</category>
      <category>programming</category>
      <category>javascript</category>
      <category>react</category>
    </item>
    <item>
      <title>What is Python?</title>
      <dc:creator>SATHISHKUMAR R</dc:creator>
      <pubDate>Sun, 25 Oct 2026 07:34:49 +0000</pubDate>
      <link>https://dev.to/sathishkumar_0506/what-is-python-477h</link>
      <guid>https://dev.to/sathishkumar_0506/what-is-python-477h</guid>
      <description>&lt;p&gt;Python is a high-level, general-purpose programming language. It is easy to learn and is used to develop websites, applications, AI, and automation programs.&lt;/p&gt;

&lt;p&gt;Example of Python&lt;br&gt;
print("Hello World!")&lt;/p&gt;

&lt;p&gt;Output:&lt;br&gt;
Hello World!&lt;/p&gt;

&lt;p&gt;Where is Python used?&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Artificial Intelligence (AI):&lt;br&gt;
Python is used to build AI applications and machine learning models.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Web Development:&lt;br&gt;
Python can build the backend of websites using frameworks like Django and Flask.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Data Science:&lt;br&gt;
Python helps analyze data and create charts and reports.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Automation:&lt;br&gt;
Python can automate repetitive tasks.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>myblog</category>
      <category>programming</category>
      <category>python</category>
      <category>linux</category>
    </item>
  </channel>
</rss>
