<?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: Sachin kumar singh</title>
    <description>The latest articles on DEV Community by Sachin kumar singh (@sachinsingh101).</description>
    <link>https://dev.to/sachinsingh101</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%2F961575%2F64a806f0-07fa-4ece-a308-e052eea9b8b2.jpg</url>
      <title>DEV Community: Sachin kumar singh</title>
      <link>https://dev.to/sachinsingh101</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sachinsingh101"/>
    <language>en</language>
    <item>
      <title>My New professional Web app that looks Awesome</title>
      <dc:creator>Sachin kumar singh</dc:creator>
      <pubDate>Mon, 23 Jan 2023 04:45:55 +0000</pubDate>
      <link>https://dev.to/sachinsingh101/my-new-professional-web-app-that-looks-awesome-5583</link>
      <guid>https://dev.to/sachinsingh101/my-new-professional-web-app-that-looks-awesome-5583</guid>
      <description>&lt;p&gt;I am happy to share you all, about my new project completey built by me using the latest Mern stack technology &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%2F17qdth8445kvm7fgus2t.jpg" 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%2F17qdth8445kvm7fgus2t.jpg" alt="Image description" width="720" height="837"&gt;&lt;/a&gt;&lt;br&gt;
I have previously built many small applications but this is the big scale project and i am very delighted to complete this on time.&lt;/p&gt;

&lt;p&gt;Here is the link and github repo  of this Awesome website &lt;/p&gt;

&lt;p&gt;&lt;a href="https://rentwala-com.onrender.com/" rel="noopener noreferrer"&gt;Rento.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/Sachinsingh101/rentostatic" rel="noopener noreferrer"&gt;Github frontend repo&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/Sachinsingh101/Rento" rel="noopener noreferrer"&gt;Github backend rep&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Its  all take me more than a month of continuous hard work and dedication to build all the awsome functionalities of this site &lt;/p&gt;

&lt;p&gt;I learnt many new tricks and hacks durind this projects and also some lessons for developers.&lt;/p&gt;

&lt;p&gt;I found that continous practice towards your goal bring you to succes in your work.&lt;br&gt;
Now i am more excited to build some large scale applications in near future &lt;br&gt;
Stay tuned with me and don't forget to follow me to get recent updates from my side &lt;/p&gt;

</description>
      <category>discuss</category>
      <category>productivity</category>
    </item>
    <item>
      <title>What is Java Virtual Machine (JVM)</title>
      <dc:creator>Sachin kumar singh</dc:creator>
      <pubDate>Mon, 23 Jan 2023 04:15:57 +0000</pubDate>
      <link>https://dev.to/sachinsingh101/what-is-java-virtual-machine-jvm-2p4o</link>
      <guid>https://dev.to/sachinsingh101/what-is-java-virtual-machine-jvm-2p4o</guid>
      <description>&lt;p&gt;This is the second tutorial of java programming for beginners series, and in this tutorial we are briefly discuss about java virtual machine's working and functionalities and why it is important.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Heart of java programming
&lt;/h2&gt;

&lt;p&gt;You may also called the jvm as the heart of java programming.&lt;br&gt;
JVM is responsible for making java protable and universal.&lt;/p&gt;

&lt;h2&gt;
  
  
  JVM working
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Step1.
&lt;/h2&gt;

&lt;p&gt;First of all .java file or programme is converted into .class file consisting of byte code instruction by the java compiler.The java compiler remains outside of the jvm.&lt;/p&gt;

&lt;h2&gt;
  
  
  step2
&lt;/h2&gt;

&lt;p&gt;Now .class file is given to the jvm. Jvm consist of a module called class loader sub system that performs the below functionalities&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;The class loader sub system loads the .class file into memory&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Then it verifies whether all byte code instructions are proper or not. If it finds any instruction suspicious the eecution is rejected immediately.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If the byte instruction are proper,then it assign necessary &lt;br&gt;
memory to execute the programme.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Note
&lt;/h2&gt;

&lt;p&gt;This memory is didvided into various parts mention below &lt;/p&gt;

&lt;h2&gt;
  
  
  1.Method area
&lt;/h2&gt;

&lt;p&gt;This memory block stores the class code, code of the methods in java programme and variables.&lt;/p&gt;

&lt;h2&gt;
  
  
  2.Heap
&lt;/h2&gt;

&lt;p&gt;This is the area where objects are created.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Pc registers
&lt;/h2&gt;

&lt;p&gt;This registers contain memory address of the insturctions of the methods. if there are 5 methods, 5 pc regiters will be used to trac the instruction of the methods.&lt;/p&gt;

&lt;p&gt;This is the breif and short discussion on Java virutal machine(jvm)&lt;br&gt;
stay tuned for our next tutorial on java&lt;br&gt;
to know more about jvm visit official java documentations.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>core JAVA for begineers android developers</title>
      <dc:creator>Sachin kumar singh</dc:creator>
      <pubDate>Mon, 23 Jan 2023 03:30:56 +0000</pubDate>
      <link>https://dev.to/sachinsingh101/core-java-for-begineers-android-developers-2a7k</link>
      <guid>https://dev.to/sachinsingh101/core-java-for-begineers-android-developers-2a7k</guid>
      <description>&lt;h2&gt;
  
  
  Introduction to Java programming
&lt;/h2&gt;

&lt;p&gt;Hello guys, i am back with amazing java tutorial for beginners.&lt;br&gt;
This whole series of java is perfectly designed for beginners need to get started in java and android development.&lt;/p&gt;

&lt;h2&gt;
  
  
  Features of Java programming
&lt;/h2&gt;

&lt;p&gt;so lets discuss features of java without any more due.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;em&gt;Platform independent&lt;/em&gt;
Java programme can be developed on any computer system and the execution of that program is possible on any other computer system loaded with 'JVM'.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;2.&lt;em&gt;Object-oriented&lt;/em&gt;&lt;br&gt;
Java programme is truely object-oriented language you cannot write and execute java programme without the use of classes in java.&lt;br&gt;
This helps to build real life applications with the help of java.&lt;/p&gt;

&lt;p&gt;3.&lt;em&gt;Secure&lt;/em&gt;&lt;br&gt;
Java was developed to work in netwroked and distributed environments by providing security&lt;br&gt;
By using java one can easily minimise the problems like eavesdropping, tampering, impersonation and virus threats.&lt;/p&gt;

&lt;p&gt;4.&lt;em&gt;Portable&lt;/em&gt;&lt;br&gt;
Java is a portable programming language because it yeild the same result on every  machine.&lt;/p&gt;

&lt;p&gt;5.&lt;em&gt;Multithreading&lt;/em&gt;&lt;br&gt;
multithreading is a programming concept and a technique in which a  programme can do multiple things on the same to provide speed and efficiency.&lt;/p&gt;

&lt;p&gt;......&lt;/p&gt;

&lt;h2&gt;
  
  
  BONUS
&lt;/h2&gt;

&lt;p&gt;.....&lt;br&gt;
In the next tutorial we are going to learn about the&lt;a href="https://dev.to/sachinsingh101/what-is-java-virtual-machine-jvm-2p4o"&gt; JVM&lt;/a&gt; responsible for making java programming universal and platform independent.&lt;/p&gt;

</description>
      <category>productivity</category>
    </item>
    <item>
      <title>React Router Version 6 Tutorial How to Set up React Router@6</title>
      <dc:creator>Sachin kumar singh</dc:creator>
      <pubDate>Wed, 02 Nov 2022 03:15:43 +0000</pubDate>
      <link>https://dev.to/sachinsingh101/react-router-version-6-tutorial-how-to-set-up-react-router6-231b</link>
      <guid>https://dev.to/sachinsingh101/react-router-version-6-tutorial-how-to-set-up-react-router6-231b</guid>
      <description>&lt;p&gt;In this tutorial we are going to discuss how to get started with react router version 6 to navigate and render multiple componets in your single page application(spa)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prerequisites&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A Basic React application&lt;/li&gt;
&lt;li&gt;Basic knowledge of react&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Install React Router&lt;/strong&gt;&lt;br&gt;
The first step after creating a react app is to install react router &lt;br&gt;
To install the react router open your command line and type below code and hit enter to install react router@6&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install react-router-dom@6
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;if you are using yarn then&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;yarn add react-router-dom@6
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;Setup React Router&lt;/strong&gt;&lt;br&gt;
The setup of react router is very simple. Navigate to your src folder and open index.js file after then import BrowserRouter from 'react-router-dom' and wrap the root component with this.&lt;/p&gt;

&lt;p&gt;After doing so your index.js file may look like this&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 from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import { BrowserRouter } from "react-router-dom";

ReactDOM.render(
  &amp;lt;BrowserRouter&amp;gt;
    &amp;lt;App /&amp;gt;
  &amp;lt;/BrowserRouter&amp;gt;,
  document.getElementById("root")
);

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

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;How To Route the other Componets&lt;/strong&gt;&lt;br&gt;
We are done with the inital setup and now we can create routes for other componets to render follow me&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Create Mutiple components to Route&lt;/strong&gt;&lt;br&gt;
Now we are creating multiple components like home.js signup.js and about.js etc.&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 from 'react'

function Contacting() {
    return (
        &amp;lt;div className="bg-danger"&amp;gt;
            &amp;lt;p&amp;gt;This is the contact page&amp;lt;/p&amp;gt;
        &amp;lt;/div&amp;gt;
    )
}

export default Contacting
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                Contact.js
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React from 'react'

function AboutUs() {
    return (
        &amp;lt;div className="bg-primary"&amp;gt;
            &amp;lt;p&amp;gt;This is the about page&amp;lt;/p&amp;gt;
        &amp;lt;/div&amp;gt;
    )
}

export default AboutUs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                        About.js
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function HomePage() {
  return (
    &amp;lt;div className="bg-success"&amp;gt;
      &amp;lt;p&amp;gt;This is the home page&amp;lt;/p&amp;gt;
    &amp;lt;/div&amp;gt;
  );
}

export default HomePage
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                         Home.js
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
  
  
  Defining Routes
&lt;/h2&gt;

&lt;p&gt;Now open app.js file and define the routes and path for specific component to render&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { Routes, Route } from "react-router-dom"
import HomePage from "./Home.js"
import AboutUs from "./About.js"
import Contacting from "./Contact.js"

function App() {
  return (
    &amp;lt;div className="App"&amp;gt;
      &amp;lt;Routes&amp;gt;
        &amp;lt;Route path="/" element={ &amp;lt;HomePage/&amp;gt; } /&amp;gt;
        &amp;lt;Route path="aboutus" element={ &amp;lt;AboutUs/&amp;gt; } /&amp;gt;
        &amp;lt;Route path="contacting" element={ &amp;lt;Contacting/&amp;gt; } /&amp;gt;
      &amp;lt;/Routes&amp;gt;
    &amp;lt;/div&amp;gt;
  )
}

export default App
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h2&gt;
  
  
  use Link tag provided by react-router-dom to navigate around
&lt;/h2&gt;


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

function Home() {
  return (
    &amp;lt;div&amp;gt;
      &amp;lt;h1&amp;gt;This is the home page&amp;lt;/h1&amp;gt;
      &amp;lt;Link to="aboutus"&amp;gt;Click to view our about page&amp;lt;/Link&amp;gt;
      &amp;lt;Link to="contacting"&amp;gt;Click to view our contact page&amp;lt;/Link&amp;gt;
    &amp;lt;/div&amp;gt;
  );
}

export default Home;

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

&lt;/div&gt;


&lt;p&gt;That's all for this tutorial now we can play around with react router in your react app.&lt;/p&gt;

&lt;p&gt;Note:-This will work only for react router version 6 &lt;/p&gt;

&lt;p&gt;follow me on github to get more tutorial like this&lt;br&gt;
&lt;/p&gt;
&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
      &lt;div class="c-embed__cover"&gt;
        &lt;a href="https://github.com/Sachinsingh101" class="c-link s:max-w-50 align-middle" rel="noopener noreferrer"&gt;
          &lt;img alt="" src="https://res.cloudinary.com/practicaldev/image/fetch/s--GsF4g6fW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://avatars.githubusercontent.com/u/104247628%3Fv%3D4%3Fs%3D400" height="460" class="m-0" width="460"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;div class="c-embed__body"&gt;
      &lt;h2 class="fs-xl lh-tight"&gt;
        &lt;a href="https://github.com/Sachinsingh101" rel="noopener noreferrer" class="c-link"&gt;
          Sachinsingh101 (Sachin Kumar Singh) · GitHub
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;p class="truncate-at-3"&gt;
          Programmer | Developer | Learner | Typist
| Editor - Sachinsingh101
        &lt;/p&gt;
      &lt;div class="color-secondary fs-s flex items-center"&gt;
          &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://res.cloudinary.com/practicaldev/image/fetch/s--uPIa4SpL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.githubassets.com/favicons/favicon.svg" width="32" height="32"&gt;
        github.com
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;



</description>
      <category>react</category>
      <category>javascript</category>
      <category>devops</category>
      <category>beginners</category>
    </item>
    <item>
      <title>How to create a mern stack Crud application ?</title>
      <dc:creator>Sachin kumar singh</dc:creator>
      <pubDate>Tue, 01 Nov 2022 04:31:15 +0000</pubDate>
      <link>https://dev.to/sachinsingh101/how-to-create-a-mern-stack-crud-application--1gla</link>
      <guid>https://dev.to/sachinsingh101/how-to-create-a-mern-stack-crud-application--1gla</guid>
      <description>&lt;p&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;br&gt;
In this tutorial we are going to learn that how we can create a beginners friendly crud application with the help of mern-stack.&lt;br&gt;
&lt;strong&gt;Prior knowledge&lt;/strong&gt;&lt;br&gt;
To follow this tutorial you should have minimum knowledge of react,node and mongodb. This are the technologies that together combine to form a mern stack.&lt;br&gt;
&lt;strong&gt;To get the complete source code visit my github account&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--566lAguM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/Sachinsingh101"&gt;
        Sachinsingh101
      &lt;/a&gt; / &lt;a href="https://github.com/Sachinsingh101/Mern-Crud-App"&gt;
        Mern-Crud-App
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      This is an Advance Crud-app made with mern-stack, You can perform any of crud operations in this app.You can colaborate with me for future projects coming soon....
    &lt;/h3&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;br&gt;
&lt;strong&gt;THE FRONTEND&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;step-1&lt;/strong&gt;&lt;br&gt;
First of open your vs code editor or any other editor you like &lt;br&gt;
then create a folder named it as mern stack crud.&lt;br&gt;
Inside this folder create two folders named it as client or server.

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--qhCHkeJz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lr97byl9afnmsn0tx8ux.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qhCHkeJz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lr97byl9afnmsn0tx8ux.png" alt="Mern stack crud app" width="183" height="97"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;step-2&lt;/strong&gt;&lt;br&gt;
Inside client folder we will create our react application.&lt;br&gt;
open command line and Type ""npx create-react-app app" then hit enter to create a basic react application inside client folder.&lt;br&gt;
after this you folder structure should look like this.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6bJCRiXr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vljo8xu21vsj8k8fgudo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6bJCRiXr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vljo8xu21vsj8k8fgudo.png" alt="React node.js and mongodb" width="194" height="177"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;step-3&lt;/strong&gt;&lt;br&gt;
After the step mention above navigate to src folder and create a folder named it as component folder.&lt;br&gt;
In this folder we will keep our all the components like 'Add user componet','edit user','all user' or the navbar component&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Yo_kR0eA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xplgycvodjrnxwbmmzd2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Yo_kR0eA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xplgycvodjrnxwbmmzd2.png" alt="Mern stack" width="213" height="417"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;step-4&lt;/strong&gt;&lt;br&gt;
Navigate to src folder then component folder and create a file or component named it as 'add user' component&lt;br&gt;
then write you code or copy the code mention below to create a basic 'add user' interface&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import {useState} from 'react'
import axios from 'axios'
function Adduser(){
    const [user,setuser]=useState({
        Name:"",
        email:"",
        number:""
    });
    function changeHandler1(e){
        setuser({
            ...user,Name:e.target.value
        })

    }
    function changeHandler2(e){
        setuser({
            ...user,email:e.target.value
        })
    }
    function changeHandler3(e){
        setuser({
            ...user,number:e.target.value
        })
    }
    function submitHandler(e){
        e.preventDefault()
        const userdata={
            name:user.Name,
            email:user.email,
            number:user.number

        }
        try{
            axios.post('http://localhost:4000/add',userdata);
            setuser({
                Name:"",
                Email:"",
                number:""
            });
            alert("user added successfully !!!");
        }catch (err){
            console.log("react aios post error",err);
        }


        console.log(userdata);

    }


    return(
        &amp;lt;&amp;gt;
          &amp;lt;div className="container m-5"&amp;gt;
            &amp;lt;h1 className="text-center text-dark"&amp;gt;Add User&amp;lt;/h1&amp;gt;
            &amp;lt;form onSubmit={submitHandler}&amp;gt;
             &amp;lt;input type="text" placeholder="Enter your Name" name="name" className="form-control m-3" onChange={changeHandler1} value={user.Name} required&amp;gt;&amp;lt;/input&amp;gt;
             &amp;lt;input type="email" placeholder="Enter your Email" name="email" className="form-control m-3" onChange={changeHandler2} value={user.Email} required&amp;gt;&amp;lt;/input&amp;gt;
             &amp;lt;input type="number" placeholder="Enter your Phone number" name="number" className="form-control m-3" onChange={changeHandler3} value={user.number} required&amp;gt;&amp;lt;/input&amp;gt;
             &amp;lt;input  type="submit"  className="btn btn-primary form-control m-3" &amp;gt;&amp;lt;/input&amp;gt;
             &amp;lt;input type="reset" className="btn btn-danger form-control m-3"&amp;gt;&amp;lt;/input&amp;gt;
            &amp;lt;/form&amp;gt;
          &amp;lt;/div&amp;gt;
        &amp;lt;/&amp;gt;
    )
}
export default Adduser;

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

&lt;/div&gt;



&lt;p&gt;Eplained:- In above code we are first creating a form after we are creating state to hold the input of the forms field then post these data to backend with the help of aios.&lt;br&gt;
&lt;strong&gt;step-5&lt;/strong&gt;&lt;br&gt;
similarly create a file named as 'alluser.js' inside component folder and copy the code below or write you own code to get a basic all user interface&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import {useState,useEffect} from 'react'
import {Link} from 'react-router-dom'
import axios from 'axios'
function Getallusers(props){

    const [Alluser,setuser]=useState({
        students:[]
    })
    useEffect(()=&amp;gt;{
        try{
            axios.get('http://localhost:4000/getallusers').then(res=&amp;gt;{
                setuser({
                    students:res.data
                });

            })
        }catch(err){
            console.log("error while getting users",err);
       }
    }) 


    return(
        &amp;lt;&amp;gt; 
          &amp;lt;table className='container-fluid text-center bg-light p-3'&amp;gt;
            &amp;lt;thead &amp;gt;
                &amp;lt;tr className='row p-3'&amp;gt;
                    &amp;lt;th className='col'&amp;gt;Name&amp;lt;/th&amp;gt;
                    &amp;lt;th className='col'&amp;gt;Email&amp;lt;/th&amp;gt;
                    &amp;lt;th className='col'&amp;gt;Phone number&amp;lt;/th&amp;gt;
                &amp;lt;/tr&amp;gt;
            &amp;lt;/thead&amp;gt;
          &amp;lt;/table&amp;gt;
          &amp;lt;table className='container-fluid'&amp;gt;
            &amp;lt;thead &amp;gt;

                {
                        Alluser.students.reverse().map(function(value,i){
                            return &amp;lt;tr className='bg-danger text-white text-center border border-dark'&amp;gt;
                                      &amp;lt;td className='border-end border-dark'&amp;gt;{value.name}&amp;lt;/td&amp;gt;
                                      &amp;lt;td className='border-end border-dark'&amp;gt;{value.email}&amp;lt;/td&amp;gt;
                                      &amp;lt;td className='border-end border-dark'&amp;gt;{value.number}&amp;lt;/td&amp;gt;
                                      &amp;lt;Link to={`/Edit/${value._id}`} className='btn btn-danger text-dark' onClick={props.name} id="edit"&amp;gt;Action&amp;lt;/Link&amp;gt;
                                    &amp;lt;/tr&amp;gt;

                        })
                    }
            &amp;lt;/thead&amp;gt;
          &amp;lt;/table&amp;gt;
        &amp;lt;/&amp;gt;
    )
}
export default Getallusers;

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

&lt;/div&gt;



&lt;p&gt;Eplained:- In the above code first we create a table then make a get request with aios then save the response to the state and use it in the table to show the alluser in our app.&lt;br&gt;
&lt;strong&gt;step-6&lt;/strong&gt;&lt;br&gt;
similarly create a file named it as 'edituser.js' inside component folder and write your own code or paste it from here to create a edit user interface&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import axios from "axios";
import {  useParams } from "react-router-dom";
import {useState,useEffect} from 'react';


function Edituser(){
    const [newdata,setnewdata]=useState({
        Name:"",
        Email:"",
        number:""
    });
    function changeHandler1(e){
        setnewdata({
           ...newdata, Name:e.target.value
        });
    }
    function changeHandler2(e){
        setnewdata({
           ...newdata, Email:e.target.value
        });
    }
    function changeHandler3(e){
        setnewdata({
           ...newdata, number:e.target.value
        });
    }
    const routeParams=useParams();
    const id=routeParams.id;
    function getsingledata(){
        axios.get(`http://localhost:4000/getsingleuser/${id}`).then(res=&amp;gt;{
            setnewdata({
                Name:res.data.name,
                Email:res.data.email,
                number:res.data.number
            });
            console.log(newdata);
        })
        console.log(id);
    }
    useEffect(()=&amp;gt;{
        getsingledata();
    },[]);
    function submitHandler(e){
        e.preventDefault()
        const updatedData={
            name:newdata.Name,
            email:newdata.Email,
            number:newdata.number
        }
        try{
            axios.put(`http://localhost:4000/Edit/${id}`,updatedData);
            setnewdata({
                Name:"",
                Email:"",
                number:""
            });
            alert("data updated successfully !!!");
        }catch(err){
            console.log("error while updating",err);
        }    
    }
    function deleteuser(){
        try {
            axios.delete(`http://localhost:4000/deleteuser/${id}`);
            alert("user deleted successfully !!!!");
            setnewdata({
                Name:"",
                Email:"",
                number:""
            });
            alert("user updated successfully !!!!1");
        }catch(err){
            console.log("error while making delete request",err);
        }

    }


    return(
        &amp;lt;&amp;gt;
          &amp;lt;div className="container mt-5"&amp;gt;
          &amp;lt;form onSubmit={submitHandler}&amp;gt;
             &amp;lt;h1 className="text-center"&amp;gt;Edit User&amp;lt;/h1&amp;gt;
             &amp;lt;input type="text" placeholder="Enter your Name" name="name" className="form-control m-3" value={newdata.Name} required onChange={changeHandler1}&amp;gt;&amp;lt;/input&amp;gt;
             &amp;lt;input type="email" placeholder="Enter your Email" name="email" className="form-control m-3" value={newdata.Email}required onChange={changeHandler2}&amp;gt;&amp;lt;/input&amp;gt;
             &amp;lt;input type="number" placeholder="Enter your Phone number" name="number" className="form-control m-3" value={newdata.number} required onChange={changeHandler3}&amp;gt;&amp;lt;/input&amp;gt;
             &amp;lt;input  type="submit" className="btn btn-primary form-control m-3"&amp;gt;&amp;lt;/input&amp;gt;
         &amp;lt;/form&amp;gt;
         &amp;lt;h5 className="text-center text-muted"&amp;gt;OR&amp;lt;/h5&amp;gt;
         &amp;lt;div className="btn btn-outline-danger form-control m-3 " onClick={deleteuser}&amp;gt;Delete&amp;lt;/div&amp;gt;
          &amp;lt;/div&amp;gt;

        &amp;lt;/&amp;gt;
    );

}
export default Edituser;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;eplained:- In the above code first we make a form then make a get request to fill up the form with the user details then maka a put request after user make some changes to his data to save it again to the database.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;step-7&lt;/strong&gt;&lt;br&gt;
Import these componets to app.js file.&lt;br&gt;
after that your app.js file should look like this.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// import logo from './logo.svg';
import {Routes,Route, redirect} from 'react-router-dom'
import './App.css';
import Navbar from './components/navbar.js';
import Adduser from './components/adduser';
import Getallusers from './components/alluser';
import Edituser from './components/edituser.js'

function App() {

  return (
    &amp;lt;&amp;gt;
      &amp;lt;Navbar/&amp;gt;
      &amp;lt;Routes&amp;gt;
        &amp;lt;Route path="/" element={&amp;lt;Adduser/&amp;gt;}/&amp;gt;
        &amp;lt;Route path="/get" element={&amp;lt;Getallusers/&amp;gt;}&amp;gt;&amp;lt;/Route&amp;gt;
        &amp;lt;Route path={`/Edit/:id`} element={&amp;lt;Edituser/&amp;gt;}&amp;gt;&amp;lt;/Route&amp;gt;
        {/* &amp;lt;Route path="/redirect"&amp;gt;&amp;lt;/Route&amp;gt; */}
      &amp;lt;/Routes&amp;gt;
    &amp;lt;/&amp;gt;
  );
}

export default App;

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

&lt;/div&gt;



&lt;p&gt;Now our frontend part completed and this is first part of our tutorial.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;THE BACKEND&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;step-1&lt;/strong&gt;&lt;br&gt;
Open the command line and navigate to server folder then install the dependencies mention below to start working with the backend.&lt;br&gt;
first step:- npm init then &lt;br&gt;
1.Express(npm i epress)&lt;br&gt;
2.mongoose(npm i mongoose)&lt;br&gt;
3.nodemon(npm i nodemon)&lt;br&gt;
4.cors(npm i cors)&lt;br&gt;
5.body-parser(npm i body-parser)&lt;br&gt;
6.dotend(npm i dotend)&lt;br&gt;
Note:- you can also install these dependencies in one go just type&lt;br&gt;
 'npm i epress mongoose nodemon cors body-parser dotenv '&lt;br&gt;
and thats all we are ready to work with backend.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;step-2&lt;/strong&gt;&lt;br&gt;
Inside server folder create the following folder or file mention below&lt;br&gt;
1.routes&lt;br&gt;
2.database&lt;br&gt;
3.controllers&lt;br&gt;
4.'.env'&lt;br&gt;
5.app.js&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;setp-3&lt;/strong&gt;&lt;br&gt;
Navigate to app.js file and paste the code given below&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import cors from 'cors'
import express from "express";
import bodyParser  from 'body-parser';
import dotenv from 'dotenv'
dotenv.config();
import router from './routes/userroute.js'
import connection from './database/connectDB.js';
import './database/model.js';
const app=express();
app.use(cors());
app.use(bodyParser.json({extended:true}));
app.use(bodyParser.urlencoded({extended:true}));
const port=process.env.PORT || '4000'
const DATABASE_URL=process.env.DATABASE_URL


app.get('/',(req,res)=&amp;gt;{
    res.send("Hello world from express");
})

app.use('/',router);
connection(DATABASE_URL)
app.listen(port,()=&amp;gt;{
    console.log("listening to 3000 port");
})
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;step-4&lt;/strong&gt;&lt;br&gt;
Navigate to route folder and create userroute.js file and paste the following code&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import express from "express";
import {postfunction , getfunction , Editfunction ,Getsingleuser, Deleteuser} from "../controllers/usercontroller.js";
const router=express.Router();

router.all('/add',postfunction);
router.get('/getallusers',getfunction);
router.put('/Edit/:id',Editfunction);
router.get('/getsingleuser/:id',Getsingleuser);
router.delete('/deleteuser/:id',Deleteuser);

export default router;


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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;step-5&lt;/strong&gt;&lt;br&gt;
Navigate to controllers folder and create controller.js file and paste the following code inside it&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import userModel from "../database/model.js";


const postfunction =  (request,response)=&amp;gt;{
   const data=request.body;
   const userdata=new userModel(data);
   userdata.save()
   response.send(data);
   console.log(data);

}
const getfunction=(req,res)=&amp;gt;{
   // res.send("hello world");
   const allusers=userModel.find((error,data)=&amp;gt;{
      if(error){
         return next(error)
      }else{
         res.json(data);
      }
   });

}

const Editfunction=async (req,res)=&amp;gt;{
   try{
      const newdata=req.body;
      const param=req.params;
      const update= await userModel.findByIdAndUpdate(param.id,newdata);
      console.log(newdata,update)
   }catch(err){
      console.log("error while updating data",err);
   }

}
const Getsingleuser=async(req,res)=&amp;gt;{
   try{
      const Data= await userModel.findById(req.params.id,'name email number');
      res.json(Data);
      console.log(Data);
      // console.log(Data);
   }catch(err){
      console.log("error while getting each  user",err);
   }
}
const Deleteuser= async (req,res)=&amp;gt;{
   try{
      const id=req.params.id;
      await userModel.findByIdAndDelete(id);
      console.log(req.params.id);
   }catch(err){
      console.log("error while deleting user",err);
   }
}

export {getfunction,postfunction,Editfunction,Getsingleuser,Deleteuser}

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;step-6&lt;/strong&gt;&lt;br&gt;
Navigate to database folder  and create connectDb.js file and paste the following code inside it to connect with database&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import mongoose from 'mongoose'

const connection = async(DATABASE_URL)=&amp;gt;{
    try{
        const Db_optiion={
            Dbname:"Sachimaa"
        }
        await mongoose.connect(DATABASE_URL,Db_optiion);
        console.log("Database connected successfully");
    } catch(err){
        console.log("error while connecting to Database ",err);
    }
}

export default connection;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;stpe-7&lt;/strong&gt;&lt;br&gt;
Inside databse folder create another file named it as module.js and paste the following code given below&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import mongoose from "mongoose";

const userSchema=new mongoose.Schema({
    name:{type:String,required:true},
    email:{type:String,required:true},
    number:{type:Number,required:true}
})

const userModel= mongoose.model('user',userSchema);

export default userModel;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;step-8&lt;/strong&gt;&lt;br&gt;
Now our backend is completed and our Crud app is ready &lt;br&gt;
You can host it to github or any other platform.&lt;/p&gt;

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