<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Module-1 on Ghafoor's Personal Blog</title><link>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/05-frontend-react/01-module/</link><description>Recent content in Module-1 on Ghafoor's Personal Blog</description><generator>Hugo</generator><language>en</language><managingEditor>noreply@example.com (AG Sayyed)</managingEditor><webMaster>noreply@example.com (AG Sayyed)</webMaster><copyright>Copyright © 2024-2026 AG Sayyed. All Rights Reserved.</copyright><atom:link href="http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/05-frontend-react/01-module/index.xml" rel="self" type="application/rss+xml"/><item><title>Module Summary</title><link>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/05-frontend-react/01-module/011-module-summary/</link><pubDate>Sat, 26 Jul 2025 19:29:19 +0000</pubDate><author>noreply@example.com (AG Sayyed)</author><guid>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/05-frontend-react/01-module/011-module-summary/</guid><description>&lt;p class="lead text-primary"&gt;
This document summarizes the essential concepts of React components, including their types, state and props management, event handling, and the component lifecycle. It provides a structured overview of how these features enable modular and interactive user interfaces in React applications.
&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="module-summary"&gt;Module Summary&lt;/h2&gt;
&lt;h3 id="react-component-types"&gt;React Component Types&lt;/h3&gt;
&lt;p&gt;React components allow the user interface to be divided into reusable, independent parts. The main types are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Functional components&lt;/strong&gt;: Simple functions that return JSX.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Class components&lt;/strong&gt;: JavaScript classes extending &lt;code&gt;React.Component&lt;/code&gt;, supporting state and lifecycle methods.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Higher-order components&lt;/strong&gt;: Functions that take a component and return a new component.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3 id="state-and-props"&gt;State and Props&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;State&lt;/strong&gt;: A plain JavaScript object representing a component&amp;rsquo;s dynamic data. Changes in state trigger re-rendering.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Props&lt;/strong&gt;: Properties passed from parent to child components, enabling data flow and configuration.&lt;/li&gt;
&lt;li&gt;Components manage their own state but receive data from outside via props.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h3 id="event-handling"&gt;Event Handling&lt;/h3&gt;
&lt;p&gt;Event handling in React manages user interactions such as clicks, mouse events, and form submissions. Event handlers are passed as props or defined within components to update state or trigger actions.&lt;/p&gt;</description></item><item><title>Passing Data Between Components</title><link>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/05-frontend-react/01-module/010-data-bw-component/</link><pubDate>Sat, 26 Jul 2025 19:20:24 +0000</pubDate><author>noreply@example.com (AG Sayyed)</author><guid>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/05-frontend-react/01-module/010-data-bw-component/</guid><description>&lt;p class="lead text-primary"&gt;
This document explores how React components manage and exchange data and state, detailing the component lifecycle phases, parent-child and child-parent communication patterns, and practical examples for robust state management in modern React applications.
&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="react-component-lifecycle-and-data-flow"&gt;React Component Lifecycle and Data Flow&lt;/h2&gt;
&lt;p&gt;React components have three main lifecycle phases: mounting, updating, and unmounting. Each phase involves specific methods that control how components are created, updated, and removed from the DOM.&lt;/p&gt;
&lt;h3 id="lifecycle-phases"&gt;Lifecycle Phases&lt;/h3&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Phase&lt;/th&gt;
 &lt;th&gt;Description&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;Mounting&lt;/td&gt;
 &lt;td&gt;Component is created and inserted into the DOM&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Updating&lt;/td&gt;
 &lt;td&gt;Component re-renders due to state or prop changes&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;Unmounting&lt;/td&gt;
 &lt;td&gt;Component is removed from the DOM&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;h4 id="mounting-methods"&gt;Mounting Methods&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;constructor&lt;/strong&gt;: Initializes the component and state, may call &lt;code&gt;super(props)&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;getDerivedStateFromProps&lt;/strong&gt;: Syncs state with props if needed.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;render&lt;/strong&gt;: Returns the JSX for the UI (must return a single root element).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;componentDidMount&lt;/strong&gt;: Runs after the component is mounted; often used for data fetching or subscriptions.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id="updating-methods"&gt;Updating Methods&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;getDerivedStateFromProps&lt;/strong&gt;: Called before every render if props change.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;shouldComponentUpdate&lt;/strong&gt;: Determines if a re-render is needed (returns &lt;code&gt;true&lt;/code&gt; by default).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;render&lt;/strong&gt;: Updates the UI based on new state/props.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;getSnapshotBeforeUpdate&lt;/strong&gt;: Captures information from the DOM before changes are applied.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;componentDidUpdate&lt;/strong&gt;: Runs after updates are flushed to the DOM.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id="unmounting-method"&gt;Unmounting Method&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;componentWillUnmount&lt;/strong&gt;: Used for cleanup (e.g., removing timers or listeners).&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 id="passing-data-between-components"&gt;Passing Data Between Components&lt;/h2&gt;
&lt;p&gt;Data can be passed between React components in several ways, depending on their relationship.&lt;/p&gt;</description></item><item><title>ES6</title><link>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/05-frontend-react/01-module/003-es6/</link><pubDate>Sat, 26 Jul 2025 18:31:09 +0000</pubDate><author>noreply@example.com (AG Sayyed)</author><guid>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/05-frontend-react/01-module/003-es6/</guid><description>&lt;p class="lead text-primary"&gt;
This document introduces ECMAScript 6 (ES6) and its significant additions to the JavaScript language. It explains the use of `let` and `const` for variable declaration, the concise syntax of arrow functions, the asynchronous handling with promises, and the introduction of classes for object-oriented programming.
&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="introduction-to-es6"&gt;Introduction to ES6&lt;/h2&gt;
&lt;p&gt;ECMAScript (ES) is a scripting language specification standardized by Ecma International. JavaScript is an implementation of this specification. ES6, released in 2015, introduced major changes to the language. Subsequent versions are named after their year of release, with ES.next referring to the upcoming version.&lt;/p&gt;</description></item><item><title>React Structure</title><link>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/05-frontend-react/01-module/002-react-structure/</link><pubDate>Sat, 26 Jul 2025 17:10:07 +0000</pubDate><author>noreply@example.com (AG Sayyed)</author><guid>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/05-frontend-react/01-module/002-react-structure/</guid><description>&lt;p class="lead text-primary"&gt;
This document provides a guide to creating React applications using the Vite build tool. It covers the steps for project creation, explains the advantages of Vite over traditional tools like Create React App, and offers a detailed breakdown of the generated folder and file structure.
&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="introduction-to-vite-for-react"&gt;Introduction to Vite for React&lt;/h2&gt;
&lt;p&gt;Previously, React projects were often created using the &lt;strong&gt;Create React App (CRA)&lt;/strong&gt; tool. However, &lt;strong&gt;CRA&lt;/strong&gt; can install numerous files and folders that may not be necessary, potentially leading to a large project size.&lt;/p&gt;</description></item><item><title>Components Lifecycle</title><link>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/05-frontend-react/01-module/009-components-lifecycle/</link><pubDate>Sat, 26 Jul 2025 00:00:00 +0000</pubDate><author>noreply@example.com (AG Sayyed)</author><guid>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/05-frontend-react/01-module/009-components-lifecycle/</guid><description>&lt;p class="lead text-primary"&gt;
This document explores the lifecycle of React class components, covering the mounting, updating, and unmounting phases, and the key lifecycle methods available in each phase. It explains how these methods interact with the DOM and how developers can use them to control component behavior.
&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="introduction-to-component-lifecycle"&gt;Introduction to Component Lifecycle&lt;/h2&gt;
&lt;p&gt;React class components have a lifecycle, meaning they go through distinct phases during their existence. The lifecycle consists of three main phases: mounting, updating, and unmounting. Each phase provides specific lifecycle methods that allow developers to control and respond to changes in the component&amp;rsquo;s relationship with the DOM.&lt;/p&gt;</description></item><item><title>Cra vs Vite</title><link>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/05-frontend-react/01-module/005-cra-vs-vite/</link><pubDate>Sat, 26 Jul 2025 00:00:00 +0000</pubDate><author>noreply@example.com (AG Sayyed)</author><guid>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/05-frontend-react/01-module/005-cra-vs-vite/</guid><description>&lt;p class="lead text-primary"&gt;
This document provides a structured comparison of Create React App (CRA) and Vite, focusing on their development workflows, build tools, performance, and suitability for different project sizes. It includes setup commands, feature highlights, and a side-by-side table for quick reference.
&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="introduction"&gt;Introduction&lt;/h2&gt;
&lt;p&gt;Modern React development often starts with a build tool that sets up the project structure, handles dependencies, and optimizes the development workflow. Two popular tools for this purpose are Create React App (CRA) and Vite. This document explores their differences, strengths, and use cases.&lt;/p&gt;</description></item><item><title>Frontend Frameworks and React</title><link>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/05-frontend-react/01-module/001-frontend-framework/</link><pubDate>Sat, 26 Jul 2025 00:00:00 +0000</pubDate><author>noreply@example.com (AG Sayyed)</author><guid>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/05-frontend-react/01-module/001-frontend-framework/</guid><description>&lt;p class="lead text-primary"&gt;
This document explores the essentials of front-end frameworks, focusing on the distinction between libraries and frameworks, and provides a comprehensive overview of React. Readers will learn about React's component-based architecture, declarative syntax, virtual DOM, one-way data binding, JSX, and hooks, all of which enable efficient and scalable web application development.
&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="introduction-to-libraries-and-frameworks"&gt;Introduction to Libraries and Frameworks&lt;/h2&gt;
&lt;p&gt;Libraries and frameworks are foundational tools in software development. A library is a collection of prewritten code that provides reusable functions for specific tasks, allowing developers to integrate them as needed. Examples include jQuery, Lodash, D3.js, and React.&lt;/p&gt;</description></item><item><title>Jsx</title><link>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/05-frontend-react/01-module/004-jsx/</link><pubDate>Sat, 26 Jul 2025 00:00:00 +0000</pubDate><author>noreply@example.com (AG Sayyed)</author><guid>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/05-frontend-react/01-module/004-jsx/</guid><description>&lt;p class="lead text-primary"&gt;
JSX (JavaScript Syntax Extension) blends HTML-like markup with JavaScript, enabling developers to describe user interfaces in a clear, declarative way. This document covers JSX's syntax, compilation, benefits, and its role in React, with practical examples and comparisons to vanilla JavaScript for building UI components.
&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="introduction-to-jsx"&gt;Introduction to JSX&lt;/h2&gt;
&lt;p&gt;JSX, or JavaScript Syntax Extension, is a syntax that combines JavaScript with HTML-like markup. It is also known as JavaScript XML. JSX allows developers to describe how user interface elements should appear on the screen using a familiar, readable format. Elements in JSX are enclosed in angle brackets, closely resembling HTML, but can also include JavaScript expressions.&lt;/p&gt;</description></item><item><title>Props and Event Handling</title><link>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/05-frontend-react/01-module/007-props-and-event-handling/</link><pubDate>Sat, 26 Jul 2025 00:00:00 +0000</pubDate><author>noreply@example.com (AG Sayyed)</author><guid>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/05-frontend-react/01-module/007-props-and-event-handling/</guid><description>&lt;p class="lead text-primary"&gt;
This document explores how React class components use props and event handling to manage state, pass data, and respond to user interactions. It covers class component structure, state management, parent-child data flow, and practical event handling examples for building interactive UIs.
&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="introduction-to-class-components-props-and-events"&gt;Introduction to Class Components, Props, and Events&lt;/h2&gt;
&lt;p&gt;React class components are JavaScript classes that extend &lt;code&gt;React.Component&lt;/code&gt;. They encapsulate UI logic, manage state, handle lifecycle events, and define methods for user interaction. Before hooks, class components were the primary way to build complex, stateful React UIs.&lt;/p&gt;</description></item><item><title>React Component</title><link>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/05-frontend-react/01-module/006-react-component/</link><pubDate>Sat, 26 Jul 2025 00:00:00 +0000</pubDate><author>noreply@example.com (AG Sayyed)</author><guid>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/05-frontend-react/01-module/006-react-component/</guid><description>&lt;p class="lead text-primary"&gt;
This document explores React components, the building blocks of React applications. It covers their modular structure, features, types (functional, class, higher-order), and how they manage state, props, and events to create dynamic, reusable user interfaces.
&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="introduction-to-react-components"&gt;Introduction to React Components&lt;/h2&gt;
&lt;p&gt;React applications are built from modular chunks of code called components. Components break down complex user interfaces into individual, reusable pieces, making development and maintenance easier. Each component can be developed, tested, and managed independently, then composed into parent components to form the complete UI.&lt;/p&gt;</description></item><item><title>React States</title><link>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/05-frontend-react/01-module/008-react-states/</link><pubDate>Sat, 26 Jul 2025 00:00:00 +0000</pubDate><author>noreply@example.com (AG Sayyed)</author><guid>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/05-frontend-react/01-module/008-react-states/</guid><description>&lt;p class="lead text-primary"&gt;
This document explores state in React class components, including local and shared state, how state enables dynamic UI updates, and the differences between state and props. It provides practical examples and a comparison table for clear understanding.
&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="introduction-to-state-in-react"&gt;Introduction to State in React&lt;/h2&gt;
&lt;p&gt;State in React is a plain JavaScript object used to represent information about a component&amp;rsquo;s current situation. State allows components to create dynamic and interactive user interfaces by tracking and responding to changes in data.&lt;/p&gt;</description></item></channel></rss>