<?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: Hasibur Rahman</title>
    <description>The latest articles on DEV Community by Hasibur Rahman (@hasiburrahmanhr11).</description>
    <link>https://dev.to/hasiburrahmanhr11</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%2F762052%2F373f9531-3ff6-41e8-a186-cbdf3a2c504f.jpeg</url>
      <title>DEV Community: Hasibur Rahman</title>
      <link>https://dev.to/hasiburrahmanhr11</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/hasiburrahmanhr11"/>
    <language>en</language>
    <item>
      <title>MongoDB Aggregation</title>
      <dc:creator>Hasibur Rahman</dc:creator>
      <pubDate>Wed, 22 Dec 2021 15:32:22 +0000</pubDate>
      <link>https://dev.to/hasiburrahmanhr11/mongodb-aggregation-3425</link>
      <guid>https://dev.to/hasiburrahmanhr11/mongodb-aggregation-3425</guid>
      <description>&lt;p&gt;When MongoDB users want to gather computed data from various documents like sum, average, minimum, maximum, etc from a MongoDB database, MongoDB aggregation can be used. The concept of aggregation mainly clusters out your data from multiple different documents which are then used to perform different types of operations. &lt;/p&gt;

&lt;p&gt;In MongoDB there are three ways to perform aggregation : &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Aggregation pipeline&lt;/li&gt;
&lt;li&gt;Map-reduce function&lt;/li&gt;
&lt;li&gt;Single-purpose aggregation methods&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Aggregation pipeline
&lt;/h2&gt;

&lt;p&gt;In MongoDB, the aggregation pipeline consists of many stages and each stage transforms the document. In each stage, it takes some documents as input and produces a result as a set of documents. In the next stage, it takes the previous result as input and produces a result. This process continues till the last stage.&lt;/p&gt;

&lt;p&gt;There are many stages in MongoDB. Each stage starts with a stage operator. Some stage operators are given below - &lt;/p&gt;

&lt;p&gt;$match: It is used for filtering the documents. It can reduce the number of documents that are given as input to the next stage.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;$group:&lt;/strong&gt; It is used to group multiple documents&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;$sort:&lt;/strong&gt; It is used to sort documents.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;$skip:&lt;/strong&gt; It is used to skip n number of documents.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;$limit:&lt;/strong&gt; It is used to pass the first n number of documents.&lt;/p&gt;

&lt;h2&gt;
  
  
  Map Reduce Function
&lt;/h2&gt;

&lt;p&gt;To aggregate, a large amount of data Map-Reduce function can be used. The map-Reduce function has two functions which are map and reduce. The map function makes a group of all the documents and the reduce function perform an operation on those grouped documents.&lt;/p&gt;

&lt;h2&gt;
  
  
  Single-purpose aggregation methods
&lt;/h2&gt;

&lt;p&gt;Single Purpose Aggregation aggregate all the documents from a single collection in MongoDB. It is used when we need simple access to document like counting the number of documents or for finding all distinct values in a document. It cannot provide flexibility and capability like map-reduce and aggregation pipeline.&lt;/p&gt;

</description>
      <category>mongodb</category>
      <category>aggregation</category>
    </item>
    <item>
      <title>Clear some react concept</title>
      <dc:creator>Hasibur Rahman</dc:creator>
      <pubDate>Wed, 22 Dec 2021 09:26:42 +0000</pubDate>
      <link>https://dev.to/hasiburrahmanhr11/clear-some-react-concept-2309</link>
      <guid>https://dev.to/hasiburrahmanhr11/clear-some-react-concept-2309</guid>
      <description>&lt;h2&gt;
  
  
  Topic - 1: React PropTypes
&lt;/h2&gt;

&lt;p&gt;Props and PropTypes are two most important concepts in React. Props are used to pass read only data from parent component to child component. If we pass any wrong data as props, it can lead to bugs and unexpected errors in our application. So we should check the prop type to avoid these kinds of bugs. But JavaScript does not provide any built-in type checking facility. That's why many developers use TypeScript for type checking. But React has a built-in props type validation mechanism which is called propTypes.&lt;/p&gt;

&lt;p&gt;Before React version 15.5.0 propTypes was a part of the React package. But in the later version of React, we need to add a dependency called prop-types to use PropTypes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Topic - 2: JSX
&lt;/h2&gt;

&lt;p&gt;JSX stands for JavaScript syntax extension. It’s a syntax extension to JavaScript that helps us to write HTML code in JavaScript. Instead of putting JavaScript into HTML, JSX allows us to put HTML in JavaScript.&lt;br&gt;
If a JavaScript contains JSX, that file needs to be translated into regular JavaScript before the file gets to the browser. So before sending the code to the browser, a transpiler like Babel will translate the HTML code into regular JavaScript code.&lt;/p&gt;

&lt;h2&gt;
  
  
  Topic - 3: Component Life Cycle
&lt;/h2&gt;

&lt;p&gt;Every React component goes through a cycle of life. Lifecycle of a component are some series of methods that are invoked in different stages of the component’s life. A React component goes through three stages of its life - &lt;br&gt;
Mount : Creation or birth of a component.&lt;br&gt;
Update :  Change or growth of a component.&lt;br&gt;
Un-mount : Removed or death of a component.&lt;/p&gt;

&lt;h2&gt;
  
  
  Topic - 4: React Hooks
&lt;/h2&gt;

&lt;p&gt;Hooks are a new feature introduced in React 16.8. It allows us to use state and other React features in a functional component, which was not possible before React 16.8. Hooks are actually some functions that are hooked into React features like state and lifecycle methods. Hooks cannot be used in class components.&lt;/p&gt;

&lt;h2&gt;
  
  
  Topic - 5: React Virtual DOM
&lt;/h2&gt;

&lt;p&gt;A virtual DOM is a representation or copy of a real DOM. For every DOM object React creates a virtual DOM. So, whenever we make any changes to the code, React will compare the virtual DOM with the Real DOM and it will re-render only the modified DOM element.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
