<?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-hasan-ali</title>
    <description>The latest articles on DEV Community by md-hasan-ali (@mdhasanali).</description>
    <link>https://dev.to/mdhasanali</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%2F782363%2Fc0bd58e6-c559-4e62-9bc5-7cd13bc5f3f0.jpeg</url>
      <title>DEV Community: md-hasan-ali</title>
      <link>https://dev.to/mdhasanali</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mdhasanali"/>
    <language>en</language>
    <item>
      <title>CRUD Operations with React and Node</title>
      <dc:creator>md-hasan-ali</dc:creator>
      <pubDate>Thu, 30 Dec 2021 02:06:27 +0000</pubDate>
      <link>https://dev.to/mdhasanali/crud-operations-with-react-4pgb</link>
      <guid>https://dev.to/mdhasanali/crud-operations-with-react-4pgb</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Ai0ZiKV3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l2zds3o5t6qwcdo3umsk.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Ai0ZiKV3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l2zds3o5t6qwcdo3umsk.jpg" alt="Image description" width="448" height="364"&gt;&lt;/a&gt;&lt;br&gt;
In this article, I will show you how to do a mern stack crud operation&lt;/p&gt;

&lt;p&gt;First of all, we will look at how to install a React front-end project.&lt;/p&gt;

&lt;p&gt;CRUD Operation:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   Step:1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Let’s start building the Front-end part with React. To create a new React App, enter the following code into the terminal and hit enter.&lt;br&gt;
    Command: npx create-react-app my-app&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Step:2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Then go inside that folder and start the project and install the necessary packages And create as many components as needed.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   Step: 3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Then you have to create a project for the backend. There are some steps to be taken. First, you have to accept all the required packages with npm-init then you have to install node MongoDB express cors these important packages.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  Step:4
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Then we can see that many APIs of crud operations have been created through the image above.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;JWT Token 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;The common use case of the JWT token is that it is used for authorization. But the main purpose of the jwt token was to allow one of the two-part browsers and the server-side to work in a standard way.&lt;/p&gt;

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

</description>
    </item>
    <item>
      <title>Simple React Concept </title>
      <dc:creator>md-hasan-ali</dc:creator>
      <pubDate>Wed, 29 Dec 2021 05:31:43 +0000</pubDate>
      <link>https://dev.to/mdhasanali/simple-react-concept-3kf8</link>
      <guid>https://dev.to/mdhasanali/simple-react-concept-3kf8</guid>
      <description>&lt;p&gt;Simple React Blogs&lt;/p&gt;

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

&lt;p&gt;Props in React: The data from a component goes down in a unidirectional way. Props one-way data binding. So React's performance is much better.&lt;/p&gt;

&lt;p&gt;State in React: The state in the react is variable, but it cannot be changed directly, it has to be changed from one of the functions.&lt;/p&gt;

&lt;p&gt;JSX in React: jsx is an extension of javascript it looks like HTML but not actually HTML, HTML code can be written through jsx in react but convert inside plan javascript with react.createlement inside.&lt;/p&gt;

&lt;p&gt;How to React works: When the React application works, React automatically creates a DOM in it, and if anything changes, it creates another virtual DOM and compares it with the previous DOM, and just updates the place where it was changed.&lt;/p&gt;

&lt;p&gt;Context API: The React Context API is as effective as a global variable for a React APP, just as declaring a global variable can be called from anywhere, so the Context API can be used anywhere from fathers to children, grandchildren without prop drilling.&lt;/p&gt;

&lt;p&gt;How To Use Context API:&lt;/p&gt;

&lt;p&gt;Import React , { createContext } from “react”;&lt;br&gt;
Const useContext = createContext();&lt;/p&gt;

&lt;p&gt;Const userProvider = ({ children }) =&amp;gt; {&lt;br&gt;
    Const [name, setName ] useState(“Jhon Doe”);&lt;br&gt;
    Const [age, setAge] = useState(1);&lt;br&gt;
    Return (&lt;br&gt;
        
            { children }&lt;br&gt;
        &lt;br&gt;
)&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;Hooks: React hooks are simple JavaScript functions and we can use these functions at different times to work with the data we need.&lt;/p&gt;

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

&lt;p&gt;Const [data , setaData ] =  useState([]);&lt;br&gt;
useEffect(()=&amp;gt; {&lt;br&gt;
    fetchData()&lt;br&gt;
    .then(res=&amp;gt;res.json())&lt;br&gt;
    .then(data=&amp;gt;setData(data);&lt;br&gt;
})&lt;br&gt;
console.log(data);&lt;/p&gt;

&lt;p&gt;Custom Hooks: Custom reacts hooks are nothing more than a simple javascript function if you want to use the same data over and over again by creating hooks and calling it over and over again from different places.&lt;/p&gt;

</description>
      <category>react</category>
      <category>hooks</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
