<?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>Forem: Mofijul Haque</title>
    <description>The latest articles on Forem by Mofijul Haque (@mofijulhaque).</description>
    <link>https://forem.com/mofijulhaque</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%2F995348%2F72fdff6b-5a20-474f-8477-2a6cfb47a0e5.jpeg</url>
      <title>Forem: Mofijul Haque</title>
      <link>https://forem.com/mofijulhaque</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/mofijulhaque"/>
    <language>en</language>
    <item>
      <title>Gmail Clone with React Js</title>
      <dc:creator>Mofijul Haque</dc:creator>
      <pubDate>Fri, 03 Feb 2023 06:57:43 +0000</pubDate>
      <link>https://forem.com/mofijulhaque/gmail-clone-with-react-js-3l1l</link>
      <guid>https://forem.com/mofijulhaque/gmail-clone-with-react-js-3l1l</guid>
      <description>&lt;p&gt;*&lt;em&gt;Live : &lt;a href="https://clone-with-react-js-4cae9.web.app/" rel="noopener noreferrer"&gt;Demo&lt;/a&gt; *&lt;/em&gt;&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%2F16gt6aus2lg95bjhqudq.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%2F16gt6aus2lg95bjhqudq.png" alt="Image description"&gt;&lt;/a&gt;&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%2Fpaa3vv5b4k1ey06igm36.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%2Fpaa3vv5b4k1ey06igm36.png" alt="Image description"&gt;&lt;/a&gt;&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%2Fje33vtotgcw7px77x4tb.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%2Fje33vtotgcw7px77x4tb.png" alt="Image description"&gt;&lt;/a&gt;&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%2Frdog7g52yn6b9cu30tii.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%2Frdog7g52yn6b9cu30tii.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Some key details about this project :-
&lt;/h2&gt;

&lt;p&gt;_&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Gmail Clone using React JS and Material UI is an email client that is built to mimic the look and feel of the popular Gmail email service.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Firebase is used here to maintain the connection with backend. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Redux is used to manage all the states used in this project.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It features a clean and modern design, inspired by Google's Material Design guidelines. The interface is intuitive and easy to use, making it a great choice for both personal and business use.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;React JS is used as the front-end framework to create the Gmail Clone's dynamic and responsive user interface. This means that the app will provide a smooth and fast experience for users, even when working with large amounts of data.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Material UI is used to style the Gmail Clone, giving it a consistent look and feel across all platforms. The framework provides a wide range of pre-designed components and styles, allowing for fast and easy customizations.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The Gmail Clone also comes with advanced security features, including authentication. This ensures that your email is always protected, and your data is secure.&lt;br&gt;
_&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>javascript</category>
      <category>react</category>
      <category>clone</category>
      <category>programming</category>
    </item>
    <item>
      <title>Json vs Object in JavaScript🤔</title>
      <dc:creator>Mofijul Haque</dc:creator>
      <pubDate>Sat, 28 Jan 2023 18:35:54 +0000</pubDate>
      <link>https://forem.com/mofijulhaque/json-vs-object-in-javascript-l87</link>
      <guid>https://forem.com/mofijulhaque/json-vs-object-in-javascript-l87</guid>
      <description>&lt;ol&gt;
&lt;li&gt;&lt;p&gt;In object in JavaScript is a collection of key-value pairs, where the keys are strings and the values can be of any type. but In JSON keys must be strings and values can only be strings, numbers, booleans, null, arrays, or other JSON objects.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;JSON and objects in JavaScript are similar in terms of the syntax and structure, but JSON is primarily used for data interchange, while objects are used as a data structure within JavaScript.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;While objects and JSON are similar in syntax, JSON is often used for data interchange between different systems or programming languages, whereas objects are used as a data structure within JavaScript. JSON.stringify() function is used to convert a JavaScript object to a JSON string, and JSON.parse() function is used to convert a JSON string to a JavaScript object.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>programming</category>
      <category>react</category>
    </item>
    <item>
      <title>Callback in JavaScript</title>
      <dc:creator>Mofijul Haque</dc:creator>
      <pubDate>Wed, 25 Jan 2023 10:31:19 +0000</pubDate>
      <link>https://forem.com/mofijulhaque/callback-in-javascript-icg</link>
      <guid>https://forem.com/mofijulhaque/callback-in-javascript-icg</guid>
      <description>&lt;p&gt;A &lt;strong&gt;callback&lt;/strong&gt; in JavaScript is a function that is passed as an argument to another function and is executed after the outer function has completed its task.&lt;/p&gt;

&lt;p&gt;For example, let's say we have a function called "getData" that retrieves data from a server. We want to display this data on the page after it is retrieved, so we pass a callback function as an argument to "getData" that will handle the display of the data.&lt;/p&gt;

&lt;p&gt;`&lt;br&gt;
function getData(callback) {&lt;br&gt;
    // code to retrieve data from server&lt;br&gt;
    let data = "Retrieved Data";&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// execute callback function with data as the argument
callback(data);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

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

&lt;p&gt;function displayData(data) {&lt;br&gt;
    console.log(data);&lt;br&gt;
  }&lt;/p&gt;

&lt;p&gt;getData(displayData); // logs "Retrieved Data" to the console&lt;br&gt;
`&lt;/p&gt;

&lt;p&gt;In this example, the "displayData" function is passed as a callback to the "getData" function. When "getData" retrieves the data from the server, it executes the "displayData" function, passing the retrieved data as an argument. This allows us to separate the logic of retrieving the data from the logic of displaying the data, making the code more modular and easier to maintain.&lt;/p&gt;

</description>
      <category>debugging</category>
      <category>refactorit</category>
      <category>documentation</category>
      <category>ai</category>
    </item>
    <item>
      <title>Closure in JavaScript</title>
      <dc:creator>Mofijul Haque</dc:creator>
      <pubDate>Wed, 25 Jan 2023 09:21:07 +0000</pubDate>
      <link>https://forem.com/mofijulhaque/closure-in-javascript-56h3</link>
      <guid>https://forem.com/mofijulhaque/closure-in-javascript-56h3</guid>
      <description>&lt;p&gt;In JavaScript, a closure is a mechanism or bundle of functions that has access to the variables in its parent scope, even after the parent function has completed executing. This allows the inner function to "remember" the values of the variables in its parent scope.&lt;/p&gt;

&lt;p&gt;Here is an example of a closure:&lt;br&gt;
`&lt;br&gt;
function outerFunction(x) {&lt;br&gt;
  return function innerFunction(y) {&lt;br&gt;
    return x + y;&lt;br&gt;
  }&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;let add5 = outerFunction(5);&lt;br&gt;
console.log(add5(3)); // 8&lt;br&gt;
`&lt;/p&gt;

&lt;p&gt;In this example, the 'outerFunction' is defined and takes a single argument 'x'. It then returns a function 'innerFunction' that takes a single argument 'y'. The 'innerFunction' has access to the 'x' variable from its parent scope, even though the 'outerFunction ' has already completed executing.&lt;/p&gt;

&lt;p&gt;When the 'add5' variable is defined, it is set to the returned value of calling 'outerFunction' with an argument of '5'. This means that 'add5' is now a reference to the 'innerFunction', with 'x' set to '5'. When 'add5' is invoked with an argument of '3', it returns '8', which is the sum of 5 and 3.&lt;/p&gt;

&lt;p&gt;Closures are used extensively in JavaScript for a variety of purposes, such as:&lt;/p&gt;

&lt;p&gt;**1. Creating private variables and methods&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Creating object data privacy&lt;/li&gt;
&lt;li&gt;Event handling&lt;/li&gt;
&lt;li&gt;Currying&lt;/li&gt;
&lt;li&gt;Creating stateful function**&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Closures are one of the core concepts in JavaScript, and a good understanding of them is crucial for developing complex and maintainable JavaScript applications.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>closure</category>
      <category>programming</category>
    </item>
    <item>
      <title>"this" keyword in JavaScript</title>
      <dc:creator>Mofijul Haque</dc:creator>
      <pubDate>Wed, 25 Jan 2023 09:05:46 +0000</pubDate>
      <link>https://forem.com/mofijulhaque/this-keyword-in-javascript-kh4</link>
      <guid>https://forem.com/mofijulhaque/this-keyword-in-javascript-kh4</guid>
      <description>&lt;h2&gt;
  
  
  In Regular Function
&lt;/h2&gt;

&lt;p&gt;In JavaScript, when an object method is invoked, the "this" keyword inside the method refers to the object that the method is a property of.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For Example&lt;/strong&gt;&lt;br&gt;
&lt;code&gt;&lt;br&gt;
let obj = {&lt;br&gt;
    name: "John",&lt;br&gt;
    sayName: function() {&lt;br&gt;
        console.log(this.name);&lt;br&gt;
    }&lt;br&gt;
};&lt;br&gt;
obj.sayName(); // Output: "John"&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Here the 'sayName' method is a property of the 'obj' object, and when it's invoked, 'this' inside the method refers to 'obj', so 'this.name' evaluates to "John".&lt;/p&gt;

&lt;h2&gt;
  
  
  In Arrow Function
&lt;/h2&gt;

&lt;p&gt;// In JavaScript, arrow functions do not have their own "this" value. Instead, they inherit the "this" value from the surrounding scope.&lt;/p&gt;

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

&lt;p&gt;`&lt;br&gt;
let obj = {&lt;br&gt;
    name: 'John',&lt;br&gt;
    sayName: () =&amp;gt; {&lt;br&gt;
        console.log(this.name);&lt;br&gt;
    }&lt;br&gt;
};&lt;/p&gt;

&lt;p&gt;obj.sayName(); // undefined (instead of "John")&lt;/p&gt;

&lt;p&gt;`&lt;br&gt;
In the example above, the arrow function 'sayName' is a method of the 'obj' object. However, because the arrow function does not have its own "this" value, it inherits the "this" value from the global scope, which is undefined instead of the 'obj' object.&lt;/p&gt;

&lt;p&gt;This can be overcome by using the bind() method to explicitly bind the this value to the object&lt;br&gt;
`&lt;/p&gt;

&lt;p&gt;let obj1 = {&lt;br&gt;
    name: 'John',&lt;br&gt;
    sayName: function () {&lt;br&gt;
        console.log(this.name);&lt;br&gt;
    }&lt;br&gt;
};&lt;/p&gt;

&lt;p&gt;let arrowSayName = obj1.sayName.bind(obj1);&lt;br&gt;
arrowSayName()// 'John'&lt;br&gt;
`&lt;/p&gt;

&lt;p&gt;It's important to note that the value of "this" can be reassigned using bind, call, or apply methods or if the method is passed as a callback function and invoked in a different context.&lt;/p&gt;

&lt;p&gt;In addition, when a constructor function is used to create an object, the "this" keyword inside the constructor function refers to the new object that is being created.&lt;/p&gt;

&lt;p&gt;'this' is a powerful tool in javascript to access the context of the function, but it can be tricky to understand and use it correctly, and it's important to keep in mind the context of the function and how it is invoked to avoid unexpected results.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It's important to understand the behavior of this keyword when it comes to arrow functions because it can lead to unexpected results and bugs in your code if you're not careful.&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>devops</category>
      <category>cloud</category>
      <category>productivity</category>
      <category>indie</category>
    </item>
    <item>
      <title>Google clone with React JS</title>
      <dc:creator>Mofijul Haque</dc:creator>
      <pubDate>Sat, 14 Jan 2023 10:46:10 +0000</pubDate>
      <link>https://forem.com/mofijulhaque/google-clone-with-react-js-41ag</link>
      <guid>https://forem.com/mofijulhaque/google-clone-with-react-js-41ag</guid>
      <description>&lt;p&gt;Building a Google clone with React.js would involve creating a single-page application (SPA) that uses React components to handle the user interface and interactions.&lt;/p&gt;

&lt;p&gt;The search bar would be implemented as a React component that includes an input field and a submit button. When the user submits a query, the component would use React's built-in lifecycle methods and hooks to handle the form submission and make an API call to the back-end service.&lt;/p&gt;

&lt;p&gt;The search results would also be implemented as a React component, which would receive the search results from the back-end service as props and render them on the page.&lt;/p&gt;

&lt;p&gt;Other features like the navigation bar and the "Feeling Lucky" button would also be implemented as React components.&lt;/p&gt;

&lt;p&gt;The application would also use a CSS  to handle the styling and layout of the page, to make it look like Google.&lt;/p&gt;

&lt;p&gt;Overall, building a Google clone with React.js would involve a combination of front-end and back-end development skills, as well as a solid understanding of React concepts such as components, state, and hooks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;Live Demo :[&lt;a href="https://google-clone-roan-beta.vercel.app/searchPage" rel="noopener noreferrer"&gt;https://google-clone-roan-beta.vercel.app/searchPage&lt;/a&gt;]&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Please Click on the "Google" icon after opening the link.&lt;br&gt;
And after that You can continue to feel the experience🙂🙂&lt;/p&gt;

&lt;p&gt;&lt;u&gt;If you want the source code then Feel free to comment me for source code.&lt;/u&gt;&lt;/p&gt;

</description>
      <category>gratitude</category>
    </item>
  </channel>
</rss>
