<?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: Md. Azad Ul Kabir</title>
    <description>The latest articles on DEV Community by Md. Azad Ul Kabir (@azadulkabir455).</description>
    <link>https://dev.to/azadulkabir455</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F640896%2Fd2ae0538-3c4e-4e5e-b21a-1723ef530efb.jpg</url>
      <title>DEV Community: Md. Azad Ul Kabir</title>
      <link>https://dev.to/azadulkabir455</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/azadulkabir455"/>
    <language>en</language>
    <item>
      <title>Custom Date range picker with React JS and React-Datepicker</title>
      <dc:creator>Md. Azad Ul Kabir</dc:creator>
      <pubDate>Sat, 16 Nov 2024 05:11:55 +0000</pubDate>
      <link>https://dev.to/azadulkabir455/custom-date-picker-with-react-js-and-react-datepicker-50k3</link>
      <guid>https://dev.to/azadulkabir455/custom-date-picker-with-react-js-and-react-datepicker-50k3</guid>
      <description>&lt;p&gt;This component completely reusable component you can just copy and past it will be work and look like below images.&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%2F3rcm35wj6ymlsvulhd4u.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%2F3rcm35wj6ymlsvulhd4u.png" alt="Image description" width="691" height="399"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here we need two files one is jsx file and one is css file both of the file given below.&lt;/p&gt;

&lt;p&gt;DateRangePicker.jsx&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React, { useState, useEffect, useRef } from "react";
import DatePicker from "react-datepicker";
import { addDays, subDays, format, subMonths, isAfter, isBefore } from "date-fns";

// Import Css
import "react-datepicker/dist/react-datepicker.css";
import "./daterange.css";

const DateRangePicker = ({ onChange }) =&amp;gt; {
  const [startDate, setStartDate] = useState(null);
  const [endDate, setEndDate] = useState(null);
  const [dateType, setDateType] = useState("today");
  const [showDatePicker, setShowDatePicker] = useState(false);
  const [selectedRange, setSelectedRange] = useState(format(new Date(), "yyy-MM-dd"));
  const [activeRange, setActiveRange] = useState("Today");
  const [manualDate, setManualDate] = useState([
    "Today",
    "Yesterday",
    "Last 7 Days",
    "Last Month",
    "Last 3 Month",
    "Last Year",
    "LifeTime"
  ]);

  // Temporary state for handling date selection before confirmation
  const [tempStartDate, setTempStartDate] = useState(new Date());
  const [tempEndDate, setTempEndDate] = useState(null);

  // Ref to the date picker container for detecting outside clicks
  const datePickerRef = useRef(null);

  const handleDateChange = (dates) =&amp;gt; {
    const [start, end] = dates;
    setStartDate(format(start, "yyy-MM-dd"));
    setEndDate(format(end, "yyy-MM-dd"));
    setTempStartDate(start);
    setTempEndDate(end);
    setDateType("custom");
  };

  const handleConfirm = () =&amp;gt; {
    if (tempStartDate.getTime() === tempEndDate?.getTime()) {
      setSelectedRange(format(tempStartDate, "yyy-MM-dd"));
    } else {
      setSelectedRange(`${format(tempStartDate, "yyy-MM-dd")} - ${format(tempEndDate, "yyy-MM-dd")}`);
    }
    setShowDatePicker(false);
    onChange({ dateType: dateType, startDate: dateType === "custom"?"":startDate?.toString(), endDate: dateType === "custom"?"": endDate?.toString() });
  };
  console.log(startDate, endDate, dateType, "date");

  const setCustomRange = (range) =&amp;gt; {
    const today = new Date();
    let start, end;

    switch (range) {
      case "Today":
        start = today;
        end = today;
        setDateType("today");
        break;
      case "Yesterday":
        start = subDays(today, 1);
        end = today;
        setDateType("yesterday");
        break;
      case "Last 7 Days":
        start = subDays(today, 6);
        end = today;
        setDateType("lastWeek");
        break;
      case "Last Month":
        start = subMonths(today, 1);
        end = today;
        setDateType("lastMonth");
        break;
      case "Last 3 Month":
        start = subMonths(today, 3);
        end = today;
        setDateType("lastTriMonth");
        break;
      case "Last Year":
        start = subDays(today, 365);
        end = today;
        setDateType("lastYear");
        break;
      case "LifeTime":
        start = new Date(2015, 0, 1);
        end = today;
        setDateType("overview");
        break;
      default:
        break;
    }

    // Update the active range
    setActiveRange(range);

    // Set the range in temporary state without confirming
    setStartDate(format(start, "yyy-MM-dd"));
    setEndDate(format(end, "yyy-MM-dd"));
    setTempStartDate(start);
    setTempEndDate(end);
  };

  useEffect(() =&amp;gt; {
    const handleClickOutside = (event) =&amp;gt; {
      if (datePickerRef.current &amp;amp;&amp;amp; !datePickerRef.current.contains(event.target)) {
        setShowDatePicker(false);
      }
    };

    document.addEventListener("mousedown", handleClickOutside);
    return () =&amp;gt; {
      document.removeEventListener("mousedown", handleClickOutside);
    };
  }, []);

  return (
    &amp;lt;div className="relative daterange"&amp;gt;
      &amp;lt;div className="relative w-full max-w-xs"&amp;gt;
        &amp;lt;input
          type="text"
          value={selectedRange}
          placeholder="Select a date range"
          onFocus={() =&amp;gt; setShowDatePicker(true)}
          readOnly
          className="w-full max-w-xs p-2 border bg-white border-gray-50 rounded shadow-sm text-gray-600 text-sm font-semibold placeholder-gray-400 focus:outline-none focus:ring-1 focus:ring-offset-slate-100 cursor-pointer"
        /&amp;gt;
        &amp;lt;span className="absolute inset-y-0 right-2 flex items-center pointer-events-none"&amp;gt;
          &amp;lt;svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"&amp;gt;
            &amp;lt;path d="M19 3h-2V1h-2v2H9V1H7v2H5c-1.1 0-1.99.9-1.99 2L3 19c0 1.1.89 2 1.99 2H19c1.1 0 1.99-.9 1.99-2L21 5c0-1.1-.89-2-1.99-2zM5 5h14v14H5V5z" /&amp;gt;
          &amp;lt;/svg&amp;gt;
        &amp;lt;/span&amp;gt;
      &amp;lt;/div&amp;gt;

      {showDatePicker &amp;amp;&amp;amp; (
        &amp;lt;div ref={datePickerRef} className="absolute right-0 flex bg-white rounded-lg shadow-md"&amp;gt;
          &amp;lt;div className="py-6 px-4 flex flex-col text-nowrap items-start gap-y-2 text-lg font-normal text-gray-800 shadow-md"&amp;gt;
            {manualDate.map((range) =&amp;gt; (
              &amp;lt;button key={range} className="flex items-center gap-x-1" onClick={() =&amp;gt; setCustomRange(range)}&amp;gt;
                &amp;lt;span className="relative inline-block w-5 h-5 rounded-full border border-gray-300 bg-white"&amp;gt;
                  &amp;lt;span
                    className={`absolute inset-1 rounded-full ${activeRange === range ? "bg-[#F7E5BE]" : ""}`}
                  &amp;gt;&amp;lt;/span&amp;gt;
                &amp;lt;/span&amp;gt;
                {range}
              &amp;lt;/button&amp;gt;
            ))}
          &amp;lt;/div&amp;gt;

          &amp;lt;div className="pt-6 px-4"&amp;gt;
            &amp;lt;DatePicker
              selected={tempStartDate}
              onChange={handleDateChange}
              startDate={tempStartDate}
              endDate={tempEndDate}
              selectsRange
              inline
              monthsShown={2}
              maxDate={new Date()}
            /&amp;gt;
            &amp;lt;div className="flex justify-end items-center py-4"&amp;gt;
              {/* &amp;lt;div&amp;gt;
                &amp;lt;h2 className="text-sm font-semibold text-gray-600"&amp;gt;Selected Date: {selectedRange}&amp;lt;/h2&amp;gt;
                &amp;lt;p className="text-xs font-normal text-gray-400 capitalize"&amp;gt;Dates are shown in Asia/Dhaka&amp;lt;/p&amp;gt;
              &amp;lt;/div&amp;gt; */}
              &amp;lt;button
                onClick={handleConfirm}
                class="px-3 py-1.5 bg-blue-500 rounded hover:bg-blue-600 text-xs font-semibold text-white uppercase"
              &amp;gt;
                Confirm
              &amp;lt;/button&amp;gt;
            &amp;lt;/div&amp;gt;
          &amp;lt;/div&amp;gt;
        &amp;lt;/div&amp;gt;
      )}
    &amp;lt;/div&amp;gt;
  );
};

export default DateRangePicker;

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

&lt;/div&gt;



&lt;p&gt;daterange.css&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@import url("https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&amp;amp;display=swap");

.daterange .react-datepicker {
  font-family: "Open Sans", serif;
  display: flex;
  border: none;
}
.daterange .react-datepicker__header {
  background-color: transparent;
  border: none;
}

.daterange .react-datepicker__navigation-icon:before {
  color: rgb(31, 41, 55);
  border-width: 2px 2px 0 0;
  top: 12px;
}
.daterange .react-datepicker__current-month {
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
  color: #1f2937;
}
.daterange .react-datepicker__day-name {
  font-size: 12px;
  font-weight: 600;
  color: rgb(156 163 175);
  padding-bottom: 6px;
}

.daterange .react-datepicker__day {
  font-size: 12px;
  font-weight: 500;
  color: #1f2937;
}
.daterange .react-datepicker__day--disabled {
  color: rgb(156 163 175);
  cursor: not-allowed;
}
.react-datepicker__day--in-range,
.react-datepicker__day--in-selecting-range:not(
    .react-datepicker__day--in-range,
    .react-datepicker__month-text--in-range,
    .react-datepicker__quarter-text--in-range,
    .react-datepicker__year-text--in-range
  ),
.react-datepicker__month-text--in-selecting-range:not(
    .react-datepicker__day--in-range,
    .react-datepicker__month-text--in-range,
    .react-datepicker__quarter-text--in-range,
    .react-datepicker__year-text--in-range
  ),
.react-datepicker__quarter-text--in-selecting-range:not(
    .react-datepicker__day--in-range,
    .react-datepicker__month-text--in-range,
    .react-datepicker__quarter-text--in-range,
    .react-datepicker__year-text--in-range
  ),
.react-datepicker__year-text--in-selecting-range:not(
    .react-datepicker__day--in-range,
    .react-datepicker__month-text--in-range,
    .react-datepicker__quarter-text--in-range,
    .react-datepicker__year-text--in-range
  ),
.react-datepicker__day-selected,
.react-datepicker__day--keyboard-selected,
.react-datepicker__day--keyboard-selected:not([aria-disabled="true"]):hover,
.react-datepicker__day--in-range:not([aria-disabled="true"]):hover,
.react-datepicker__day--selected:not([aria-disabled="true"]):hover,
.react-datepicker__day--in-selecting-range:not([aria-disabled="true"]):hover {
  background-color: #f7e5be;
  border-radius: 4px;
}

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

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>All About JavaScript Array</title>
      <dc:creator>Md. Azad Ul Kabir</dc:creator>
      <pubDate>Mon, 01 Jul 2024 16:15:40 +0000</pubDate>
      <link>https://dev.to/azadulkabir455/all-about-javascript-array-4m36</link>
      <guid>https://dev.to/azadulkabir455/all-about-javascript-array-4m36</guid>
      <description>&lt;h2&gt;
  
  
  Here I am trying to elaborate on JavaScript Array features and built-in methods. I believe you can find this useful.
&lt;/h2&gt;

&lt;p&gt;Please click the below link to read this Article&lt;br&gt;
🚀 Link: &lt;a href="https://shorturl.at/wHNCN"&gt;Article Link&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Follow more articles like this follow me.&lt;br&gt;
🚀Link: &lt;a href="https://www.linkedin.com/in/azadulkabir/"&gt;Azad Ul Kabir&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>All About JavaScript string</title>
      <dc:creator>Md. Azad Ul Kabir</dc:creator>
      <pubDate>Thu, 27 Jun 2024 16:31:43 +0000</pubDate>
      <link>https://dev.to/azadulkabir455/all-about-javascript-string-4mp0</link>
      <guid>https://dev.to/azadulkabir455/all-about-javascript-string-4mp0</guid>
      <description>&lt;h2&gt;
  
  
  Here I am trying to elaborate on JavaScript strings and built-in methods. I believe you can find this useful.
&lt;/h2&gt;

&lt;p&gt;Please click the below link to read this Article&lt;br&gt;
🚀 Link: &lt;a href="https://shorturl.at/uDEBi"&gt;Article Link&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Follow more articles like this follow me.&lt;br&gt;
🚀Link: &lt;a href="https://www.linkedin.com/in/azadulkabir/"&gt;Azad Ul Kabir&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>All About JavaScript Object</title>
      <dc:creator>Md. Azad Ul Kabir</dc:creator>
      <pubDate>Wed, 26 Jun 2024 12:30:42 +0000</pubDate>
      <link>https://dev.to/azadulkabir455/all-about-javascript-object-25an</link>
      <guid>https://dev.to/azadulkabir455/all-about-javascript-object-25an</guid>
      <description>&lt;h2&gt;
  
  
  Here I am trying to elaborate on JavaScript Arrays features and built-in methods. I believe you can find this useful.
&lt;/h2&gt;

&lt;p&gt;Please click the below link to read this Article&lt;br&gt;
🚀 Link: &lt;a href="https://shorturl.at/5JetU"&gt;Article Link&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Follow more articles like this follow me.&lt;br&gt;
🚀Link: &lt;a href="https://www.linkedin.com/in/azadulkabir/"&gt;Azad Ul Kabir&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>React Router not working after "React app" published through GitHub actions</title>
      <dc:creator>Md. Azad Ul Kabir</dc:creator>
      <pubDate>Tue, 14 May 2024 15:00:34 +0000</pubDate>
      <link>https://dev.to/azadulkabir455/react-router-not-working-after-react-app-published-through-github-actions-1ddj</link>
      <guid>https://dev.to/azadulkabir455/react-router-not-working-after-react-app-published-through-github-actions-1ddj</guid>
      <description>&lt;p&gt;If your React application is not working properly after being published on GitHub Pages, it's often related to the routing configuration. Here are a few common issues and their solutions:&lt;/p&gt;

&lt;h1&gt;
  
  
  1. Configuring React Router for GitHub Pages
&lt;/h1&gt;

&lt;p&gt;GitHub Pages serves the &lt;em&gt;index.html&lt;/em&gt; for all 404 responses by default, which means when using React Router, you need to ensure all routes fall back to index.html.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Solution&lt;/strong&gt;&lt;br&gt;
Add a &lt;em&gt;404.html&lt;/em&gt; file that contains the same content as your index.html file. This way, any invalid routes will serve your index.html and React Router will handle the routing.&lt;/p&gt;
&lt;h1&gt;
  
  
  2. Ensure the Correct homepage in package.json
&lt;/h1&gt;

&lt;p&gt;Make sure you have the correct homepage field in your package.json. This helps with resolving the paths correctly.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "name": "your-app",
  "version": "0.1.0",
  "homepage": "https://your-username.github.io/your-repo-name",
  ...
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  3. Change the "private" property value in package.json
&lt;/h1&gt;

&lt;p&gt;Change the private property value from &lt;em&gt;true&lt;/em&gt; to &lt;em&gt;false&lt;/em&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "name": "your-app",
  "version": "0.1.0",
  "private": false,
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  4. Need to add root path to the basename prop of BrowserRouter
&lt;/h1&gt;

&lt;p&gt;If you are not using BrowserRouter, You need to add your root path to the basename prop of BrowserRouter&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import {BrowserRouter} from 'react-router-dom'

ReactDOM.render((
   &amp;lt;BrowserRouter basename={process.env.PUBLIC_URL}&amp;gt;
     &amp;lt;App /&amp;gt;
   &amp;lt;/BrowserRouter&amp;gt;
), ...)  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  5. If BrowserRouter is not working use HasRouter
&lt;/h1&gt;

&lt;p&gt;GitHub Pages doesn't support single-page applications (SPA) routing out of the box with BrowserRouter because it relies on client-side routing. A common workaround is to use HashRouter, which uses the URL hash to keep track of the route.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { HashRouter } from 'react-router-dom';

ReactDOM.render(
  &amp;lt;HashRouter &amp;gt;
    &amp;lt;App /&amp;gt;
  &amp;lt;/HashRouter &amp;gt;,
  document.getElementById('root')
);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  6. Check CNAME
&lt;/h1&gt;

&lt;p&gt;If you are using a custom domain with GitHub Pages, ensure your CNAME file is correctly set up and included in your public directory.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;my-app/
  public/
    index.html
    404.html
    CNAME (if using a custom domain)
  src/
    App.js
    index.js
  package.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>Truthy And Falsy Value In JavaScript.</title>
      <dc:creator>Md. Azad Ul Kabir</dc:creator>
      <pubDate>Thu, 02 Mar 2023 05:34:31 +0000</pubDate>
      <link>https://dev.to/azadulkabir455/truthy-and-falsy-value-in-javascript-4gjg</link>
      <guid>https://dev.to/azadulkabir455/truthy-and-falsy-value-in-javascript-4gjg</guid>
      <description>&lt;p&gt;There are two most important terms to understand when you execute some code based on an "if else" statement. Truthy and Falsy value.&lt;br&gt;
Truthy value: Data types that return true by default are called truthy.&lt;br&gt;
False value: Data types that return false by default are called falsy&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;All values are truthy except these values &lt;/li&gt;
&lt;li&gt;+0 or -0&lt;/li&gt;
&lt;li&gt;BigInt zero (0n)&lt;/li&gt;
&lt;li&gt;Empty String ("")&lt;/li&gt;
&lt;li&gt;null, undefined, and NaN&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example below this code we are performing a Linear search. But when I apply a condition for "value not found" I have a complexity for array index 0. Because it's a falsy value if I use the findIndex variable value as an 'if' condition. I solved this in my way. But there have several ways to solve this.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--NIkCGmR2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/23f4inlj38bdmn3ppy41.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--NIkCGmR2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/23f4inlj38bdmn3ppy41.png" alt="Image description" width="880" height="628"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>programming</category>
      <category>tutorial</category>
      <category>react</category>
    </item>
    <item>
      <title>Git Basic Commands That You Need For Regular Project Work</title>
      <dc:creator>Md. Azad Ul Kabir</dc:creator>
      <pubDate>Tue, 24 Jan 2023 06:47:51 +0000</pubDate>
      <link>https://dev.to/azadulkabir455/git-basic-commands-that-you-need-for-regular-basic-project-work-3b15</link>
      <guid>https://dev.to/azadulkabir455/git-basic-commands-that-you-need-for-regular-basic-project-work-3b15</guid>
      <description>&lt;p&gt;I am trying to list some commands above the work criteria. Check this below&lt;/p&gt;

&lt;h3&gt;
  
  
  Git Initial Command:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. git init
2. git status
3. git --version
4. rm -rf .git  //Remove git folder
5. git status -s
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Git Configuration Command:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. git config --global user.name "username"
2. git config --global user.email "email"
3. git config --list
4. git config --global alias.last "log -p -1"  //Create alias for shortcut
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Git File Add Command:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. git add .   //Stages new and modified file without deleted file
2. git add -A  //Stages all file
3. git add -u  //Stages modified and deleted file without new file
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Git Commit Command:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. git commit -m "messeage"
2. git commit -a -m "message"  //Stage file commit without add
3. git commit --amend          //Change the last commit
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Git Commit Log Command:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. git log
2. git log -p -2
3. git log --stat
4. git log --pretty=oneline
5. git log --pretty=short/full
6. git log --pretty=format:"%h 00 %ae"
7. git log --since=2.days/weeks/months/years
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Git Branch Command:
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. git branch
2. git branch `branchName`
3. git checkout `branchName`
4. git merge `branchName`                 //Branch must be master
5. git branch -v
6. git branch --merged
7. git brach --no-merged
8. git branch -d `branchName`             //Locally deleted
9. git push origin --delete `branchName`  //Deledted on github
10. git checkout -b "branchName"          // Create brach and switch to the created branch
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Git Compare Command
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. git diff `fileName`           //Difference tracked file code between last commit file to now
2. git diff --staged `filename`  //Difference Stages file code between last commit file to now
3. git reset `fileName`          //Stages file to unstages file
4. git checkout `fileName`       //Clear file to last commit
5. git checkout -f               //For all file
6. git rm --cached `fileName`    //Tracked file to Untracked file
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Git Command For Github
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. git remote add origin `url`
2. git remote rm origin
3. git push -u origin master
4. git pull origin master
5. git remote -v
6. git clone `url`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Git Extra Command
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1 .gitignore
2. git rm `fileName`
3. git mv `fileName1` `fileName2`  //Change the filename &amp;amp; fileName2 is changed name.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; If you don't understand any command, find out on Google. This way you can learn about git commands properly and have a crystal clear idea on git commands. Keep exploring.&lt;/p&gt;

</description>
      <category>cloud</category>
      <category>webdev</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Redux Vs Redux Toolkit</title>
      <dc:creator>Md. Azad Ul Kabir</dc:creator>
      <pubDate>Sun, 15 Jan 2023 19:16:03 +0000</pubDate>
      <link>https://dev.to/azadulkabir455/redux-vs-redux-toolkit-472b</link>
      <guid>https://dev.to/azadulkabir455/redux-vs-redux-toolkit-472b</guid>
      <description>&lt;h2&gt;
  
  
  Difference Between Redux &amp;amp; Redux Toolkit.
&lt;/h2&gt;

&lt;p&gt;First of all, before knowing the difference between redux and redux toolkit we must know what definition two of this is.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Redux:&lt;/strong&gt; Redux is an open-source JavaScript library for managing and centralizing application states.&lt;/p&gt;

&lt;p&gt;That means if you have a state(like a variable) or many states that need to many components or modules. So you need to make globalize those states to easily access them. Redux does this work for us.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Redux Toolkit:&lt;/strong&gt; Redux Toolkit is a set of tools that helps simplify Redux development. &lt;/p&gt;

&lt;p&gt;In other words, if I configure something through redux, as hard as it will be, but the same task we can perform it easily with the redux toolkit.&lt;/p&gt;

&lt;h2&gt;
  
  
  Redux VS Redux Toolkit
&lt;/h2&gt;

&lt;p&gt;Some of the differences are highlighted below&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;In Redux you must configure Devtools but in the Redux toolkit, you don't have to configure. Because it already has.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In Redux for asynchronous performance you need to add Redux Thunk, But in the Redux toolkit, it's already built-in.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Redux requires too much boilerplate code but the Redux toolkit doesn't.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What Should I learn?
&lt;/h2&gt;

&lt;p&gt;In my preference, you should learn the Redux toolkit. It also depends on other requirements.&lt;/p&gt;

&lt;p&gt;But before learning the Redux toolkit you must learn Redux basics. Because, you have to crystal clear concept about &lt;strong&gt;Action&lt;/strong&gt;, &lt;strong&gt;Reducer&lt;/strong&gt;, and **Store **and their work procedure. After that, you can jump to the Redux toolkit.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2Fh9diuogxgc61197m671l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2Fh9diuogxgc61197m671l.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  React Redux Toolkit Roadmap.
&lt;/h2&gt;

&lt;p&gt;Their three things that you have to learn to use redux in your react app and the learning sequence is below. (Top to bottom)&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Redux (Basic must).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;React Redux. After that&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Redux Toolkit.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you are a beginner you can follow this tutorial playlist. I hope it helps you a lot.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=0awA5Uw6SJE&amp;amp;list=PLC3y8-rFHvwiaOAuTtVXittwybYIorRB3" rel="noopener noreferrer"&gt;Tutorial Link&lt;/a&gt;&lt;/p&gt;

</description>
      <category>react</category>
      <category>redux</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
