How to build a basic CRUD app with Node.js and ReactJS ? - GeeksforGeeks (2023)

In this article, we will create a basic Student app from scratch.

App functionality:

  • Create a new student
  • Update an existing student
  • Show students list
  • Delete a student

REST API in this project:




First of all, we will work on the frontend part of our application using React.js.

Create React Application and installing modules

Step 1: Let’s start building the Front-end part with React. To create a new React App, enter the following code into terminal and hit enter.

npx create-react-app mern-stack-crud

Step 2: Move into the React project folder.

cd mern-stack-crud

Step 3:To run the React App, run the following command:

npm start

This command opens the React App to the browser on the following URL: http://localhost:3000/

Step 4:To build the React App we need to install some external modules.



React-BootstrapReact-Bootstrap has evolved and grown alongside React, making it an excellent choice for your UI.
React-Router-DomReact Router DOM enables you to implement routing in a React App.
AxiosIt is a promise base HTTP Client and use for network request.
FormikA great library to build form in React.
YupYup is a JavaScript schema builder for form validation.

To install, run the following code on the terminal.

npm i react-bootstrap@next bootstrap@5.1.0 react-router-dom axios formik yup

Step 5: Creating Simple React Components – In this step we will create some React Components to manage student data.

Head over to src folder, make a folder and name it Components and within that directory create the following components.

  • StudentForm.js – Reusable Student form
  • create-student.component.js – Responsible for create new student
  • edit-student.component.js – Responsible for update student data
  • student-list.component.js – Responsible for display all student
  • StudentTableRow.js – Responsible for display a single student

Project Structure: It will look like the following

How to build a basic CRUD app with Node.js and ReactJS ? - GeeksforGeeks (1)

front-end project structure

Step 6: Create student form – In this step, we will build a reusable student form with Formik and React-Bootstrap. This form has all the necessary fields to enter student details. We have also made client-side form validation with Yup. In the future, we will use this component for creating and update a student. Go to src/Components/StudentForm.js and write the following code.


import React from "react";

import * as Yup from "yup";

import { Formik, Form, Field, ErrorMessage } from "formik";

import { FormGroup, FormControl, Button } from "react-bootstrap";

const StudentForm = (props) => {

const validationSchema = Yup.object().shape({

name: Yup.string().required("Required"),

email: Yup.string()

.email("You have enter an invalid email address")


rollno: Yup.number()

.positive("Invalid roll number")

.integer("Invalid roll number")




return (

<div className="form-wrapper">

<Formik {...props} validationSchema={validationSchema}>



<Field name="name" type="text"

className="form-control" />



className="d-block invalid-feedback"





<Field name="email" type="text"

className="form-control" />



className="d-block invalid-feedback"





<Field name="rollno" type="number"

className="form-control" />



className="d-block invalid-feedback"




<Button variant="danger" size="lg"

block="block" type="submit">








export default StudentForm;

Step 7: Create a new student: In this step, we will create a component to add a new student. We have already created a StudentForm component to enter student details. Now, it’s time to use this component. Go to src/Components/create-student.component.js and write the following code.


// CreateStudent Component for add new student

// Import Modules

import React, { useState, useEffect } from "react";

import axios from 'axios';

import StudentForm from "./StudentForm";

// CreateStudent Component

const CreateStudent = () => {

const [formValues, setFormValues] =

useState({ name: '', email: '', rollno: '' })

// onSubmit handler

const onSubmit = studentObject => {


.then(res => {

if (res.status === 200)

alert('Student successfully created')




.catch(err => alert('Something went wrong'))


// Return student form


<StudentForm initialValues={formValues}



Create Student




// Export CreateStudent Component

export default CreateStudent

(Video) React JS CRUD Application | React JS Tutorial | React Hooks

Step 8: Update student’s details: In this section, we will create a component to update details. We have reusable StudentForm component, let’s use it again. We will fetch student details to reinitialise form. Go to src/Components/edit-student.component.js and write the following code.


// EditStudent Component for update student data

// Import Modules

import React, { useState, useEffect } from "react";

import axios from "axios";

import StudentForm from "./StudentForm";

// EditStudent Component

const EditStudent = (props) => {

const [formValues, setFormValues] = useState({

name: "",

email: "",

rollno: "",


//onSubmit handler

const onSubmit = (studentObject) => {





.then((res) => {

if (res.status === 200) {

alert("Student successfully updated");


} else Promise.reject();


.catch((err) => alert("Something went wrong"));


// Load data from server and reinitialize student form

useEffect(() => {





.then((res) => {

const { name, email, rollno } =;

setFormValues({ name, email, rollno });


.catch((err) => console.log(err));

}, []);

// Return student form

return (






Update Student




// Export EditStudent Component

export default EditStudent;

Step 9: Display list of students: In this step, we will build a component to display the student details in a table. We will fetch student’s data and iterate over it to create table row for every student. Go to src/Components/student-list.component.js and write the following code.


import React, { useState, useEffect } from "react";

import axios from "axios";

import { Table } from "react-bootstrap";

import StudentTableRow from "./StudentTableRow";

const StudentList = () => {

const [students, setStudents] = useState([]);

useEffect(() => {


.then(({ data }) => {



.catch((error) => {



}, []);

const DataTable = () => {

return, i) => {

return <StudentTableRow obj={res} key={i} />;



return (

<div className="table-wrapper">

<Table striped bordered hover>





<th>Roll No</th>









export default StudentList;

Step 10: Display a single student: In this step, we will return table row which is responsible to display student data. Go to src/Components/StudentTableRow.js and write the following code.


import React from "react";

import { Button } from "react-bootstrap";

import { Link } from "react-router-dom";

import axios from "axios";

const StudentTableRow = (props) => {

const { _id, name, email, rollno } = props.obj;

const deleteStudent = () => {



.then((res) => {

if (res.status === 200) {

alert("Student successfully deleted");


} else Promise.reject();


.catch((err) => alert("Something went wrong"));


return (






<Link className="edit-link"

to={"/edit-student/" + _id}>



<Button onClick={deleteStudent}

size="sm" variant="danger">







export default StudentTableRow;

(Video) CRUD app in React JS with Firebase

Step 11: Edit App.js: Finally, include the menu to make routing in our MERN Stack CRUD app. Go to src/App.js and write the following code.


// Import React

import React from "react";

// Import Bootstrap

import { Nav, Navbar, Container, Row, Col }

from "react-bootstrap";

import "bootstrap/dist/css/bootstrap.css";

// Import Custom CSS

import "./App.css";

// Import from react-router-dom

import { BrowserRouter as Router, Switch,

Route, Link } from "react-router-dom";

// Import other React Component

import CreateStudent from


import EditStudent from


import StudentList from


// App Component

const App = () => {

return (


<div className="App">

<header className="App-header">

<Navbar bg="dark" variant="dark">



<Link to={"/create-student"}


React MERN Stack App



<Nav className="justify-content-end">


<Link to={"/create-student"}


Create Student




<Link to={"/student-list"}


Student List









<Col md={12}>

<div className="wrapper">


<Route exact path="/"

component={CreateStudent} />

<Route path="/create-student"

component={CreateStudent} />

<Route path="/edit-student/:id"

component={EditStudent} />

<Route path="/student-list"

component={StudentList} />










export default App;

Step 12: Add style – Go to src/App.css and write the following code.


.wrapper {

padding-top: 30px;


body h3 {

margin-bottom: 25px;


.navbar-brand a {

color: #ffffff;



.table-wrapper {

max-width: 500px;

margin: 0 auto;


.table-wrapper {

max-width: 700px;


.edit-link {

padding: 7px 10px;

font-size: 0.875rem;

line-height: normal;

border-radius: 0.2rem;

color: #fff;

background-color: #28a745;

border-color: #28a745;

margin-right: 10px;

position: relative;

top: 1px;


.edit-link:hover {

text-decoration: none;

color: #ffffff;


/* Chrome, Safari, Edge, Opera */


input::-webkit-inner-spin-button {

-webkit-appearance: none;

margin: 0;


/* Firefox */

input[type=number] {

-moz-appearance: textfield;


(Video) The Ultimate Guide to Full Stack Development with React and Node JS

Now, we have successfully created the frontend for our mern-stack-app. Let’s build the backend part. Before, jumping to next section take a look how the frontend part working without backend.

Step to run the application: Open the terminal and type the following command.

npm start


How to build a basic CRUD app with Node.js and ReactJS ? - GeeksforGeeks (2)

Now we will work on the backend part of our application. We will create a folder inside our mern-stack-crud to manage the server services such as database, models, schema, routes and APIs, name this folder backend.

Step 1: Run command to create backend folder for server and get inside of it.

mkdir backend && cd backend

Step 2: Create package.json – Next, we need to create a separate package.json file for managing the server of our mern-stack-crud app.

npm init -y

Go to backend/package.json file will look like the following. Replace the test property like:

"test": "echo \"Error: no test specified\" && exit 1" "start": "nodemon server.js"

Step 3: Install Node Dependencies – Install the following Node dependencies.



ExpressNode.js framework that helps in creating powerful REST APIs.
body-parserExtracts the entire body portion of a request stream and exposes it on req.body.
corsIt’s a Node.js package that helps in enabling Access-Control-Allow-Origin CORS header.
mongooseIt’s a NoSQL database for creating a robust web application.

To install the above dependencies, run the following code on the terminal.

npm install express body-parser cors mongoose

You may install nodemon as dev dependency to automate the server restarting process.

npm i -D nodemon

Back-end project structure

How to build a basic CRUD app with Node.js and ReactJS ? - GeeksforGeeks (3)

back-end project structure

Step 4: Setting up MongoDB Database – In this step, we will set up a MongoDB database for our app. Before, starting make sure you have latest version of MongoDB is installed on your system. Create folder inside the backend folder and name it database. Create a file by the name of db.js inside the database folder. Go to backend/database/db.js and write the following code.


module.exports = {


We have declared the MongoDB database and name it reactdb.

Step 5: Define Mongoose Schema – Now, create MongoDB schema for interacting with MongoDB database. Create a folder called models inside backend folder to keep schema related files and create a file Student.js inside of it to define MongoDB schema. Go to backend/models/Student.js and write the following code.


const mongoose = require('mongoose');

const Schema = mongoose.Schema;

let studentSchema = new Schema({

name: {

type: String


email: {

type: String


rollno: {

type: Number


}, {

collection: 'students'


module.exports = mongoose.model('Student', studentSchema)

We declared name, email, and rollno fields along with their respective data types in student Schema.

Step 6: Create Routes Using ExpressJS – In this step, we are set up some routes (REST APIs) for CREATE, READ, UPDATE and DELETE using Express and Node.js. These routes will help us to manage the data in our mern-stack-crud app. Create a folder and name it routes inside backend folder. Here we will keep all the routes related files. Also, create a file and name it student.routes.js inside routes folder, in this file we will define our routes.

mkdir routes && cd routes && touch student.route.js

Then, go to backend/routes/student.route.js file and write the following code.


let mongoose = require("mongoose"),

express = require("express"),

router = express.Router();

// Student Model

let studentSchema = require("../models/Student");

// CREATE Student"/create-student", (req, res, next) => {

studentSchema.create(req.body, (error, data) => {

(Video) Understand Functions in Javascript | Full Stack Development with React & Node JS | GeeksforGeeks

if (error) {

return next(error);

} else {






// READ Students

router.get("/", (req, res) => {

studentSchema.find((error, data) => {

if (error) {

return next(error);

} else {





// UPDATE student



// Get Single Student

.get((req, res) => {

studentSchema.findById(, (error, data) => {

if (error) {

return next(error);

} else {





// Update Student Data

.put((req, res, next) => {



$set: req.body,


(error, data) => {

if (error) {

return next(error);


} else {


console.log("Student updated successfully !");





// Delete Student


(req, res, next) => {

studentSchema.findByIdAndRemove(, (error, data) => {

if (error) {

return next(error);

} else {


msg: data,





module.exports = router;

Step 7: Configure server.js – We have almost created everything for our mern-stack-crud app. Now, create the server.js file in the root of the backend folder. Go to backend/server.js and write the following code.


let express = require('express');

let mongoose = require('mongoose');

let cors = require('cors');

let bodyParser = require('body-parser');

let dbConfig = require('./database/db');

// Express Route

const studentRoute = require('../backend/routes/student.route')

// Configure mongoDB Database

mongoose.set('useNewUrlParser', true);

mongoose.set('useFindAndModify', false);

mongoose.set('useCreateIndex', true);

mongoose.set('useUnifiedTopology', true);

// Connecting MongoDB Database

mongoose.Promise = global.Promise;

mongoose.connect(dbConfig.db).then(() => {

console.log('Database successfully connected!')


error => {

console.log('Could not connect to database : ' + error)



const app = express();



extended: true



app.use('/students', studentRoute)


const port = process.env.PORT || 4000;

const server = app.listen(port, () => {

console.log('Connected to port ' + port)


// 404 Error

app.use((req, res, next) => {

res.status(404).send('Error 404!')


app.use(function (err, req, res, next) {


if (!err.statusCode) err.statusCode = 500;



Now, we have successfully created the backend for our mern-stack-app.

Our final project directory structure:

How to build a basic CRUD app with Node.js and ReactJS ? - GeeksforGeeks (4)


Now, start the MongoDB database server to run the server.

Step to run the application: Open a terminal and run the following command to start the Nodemon server by staying in the backend folder.

npm start

If everything is working well you will see the following output on the terminal screen.

How to build a basic CRUD app with Node.js and ReactJS ? - GeeksforGeeks (5)

mern-stack-crud server-running

Final output:

How to build a basic CRUD app with Node.js and ReactJS ? - GeeksforGeeks (6)

(Video) React ToDo List Tutorial (V1) | Full React JS Project for Beginners from Scratch


My Personal Notesarrow_drop_up


How do you create a simple CRUD in ReactJS? ›

Let's start with creating a React App using create-react-app CLI.
  1. 1 - Create a React UI with Create React App. ...
  2. 2 - React CRUD App Project Structure. ...
  3. 3 - Adding Bootstrap in React Using NPM. ...
  4. 4 - EmployeeService - Consume CRUD REST API Call. ...
  5. 5 - package.json. ...
  6. 6 - React List Employee Component. ...
  7. 7 - Create Header and Footer.

How do you make a basic CRUD app? ›

Build your CRUD app front-end
  1. Architecture & design. ...
  2. Create your React application.
  3. Install the Semantic UI Package for React. ...
  4. Create your app first screen.
  5. Create your CREATE, READ and UPDATE files for your CREATE, READ and UPDATE component, no need for a new component for DELETE.
May 4, 2022

How to create CRUD in NodeJS? ›

Let's Start
  1. We create the repository and install the dependencies. The entry point is the server. ...
  2. express: It is a minimal and flexible Node. ...
  3. Setup Express Web Server. ...
  4. Create and configure the .env file. ...
  5. ./src/db/schema.js. ...
  6. ./src/db/connection.js. ...
  7. ./src/middlewares/index.js. ...
  8. Now, we code the API Endpoints.
Oct 7, 2021

How to create a simple CRUD application using only JavaScript? ›

A simple CRUD application with Javascript
  1. “el” : the div element ;
  2. “countries” : rows in an array ;
  3. “Count” : number of rows ;
  4. “FetchAll” : select all rows ;
  5. “Add” : add a new row ;
  6. “Edit” : edit a row ;
  7. “Delete” : delete a row.

What is the simplest CRUD app? ›

Budibase is a low code platform that is designed for creating CRUD applications. From the frameworks, tech stacks, and platforms listed above, Budibase is the easiest and fastest way to build a CRUD application.

What is basic CRUD with React? ›

CRUD stands for Create, Read, Update, and Delete. In ReactJS everything is aligned in a form of a component and every component has its own way and feature to do so. React js is one of the most used JavaScript libraries for frontend development.

How to build a basic CRUD app with Node js Reactjs and MySQL? ›

React + Node. js + Express + MySQL example: Build a CRUD App
  1. Overview.
  2. Implementation. Create Node.js App. Setup Express web server. Configure MySQL database & Sequelize. Initialize Sequelize. Define the Sequelize Model. Create the Controller. Run the Node.js Express Server.
Sep 23, 2022

What are the basic CRUD operations in NodeJS? ›

CRUD (Create, Read, Update, Delete) operations allow you to work with the data stored in MongoDB. The CRUD operation documentation is categorized in two sections: Read Operations find and return documents stored within your MongoDB database. Write Operations insert, modify, or delete documents in your MongoDB database.

What are the basic CRUD commands? ›

CRUD is an acronym that comes from the world of computer programming and refers to the four functions that are considered necessary to implement a persistent storage application: create, read, update and delete.

How to create CRUD operation without database? ›

Step 1
  1. We have to create a Webpage, for which we open the Visual Studio -> new option and select the new Website.
  2. Chose an “ASP.NET Empty Web Site” and give a solution name. ...
  3. Right click on the Solution Explorer, go to Add option, select Add New Item option and select Web form and click Add option.
Jun 6, 2016

Can I make an app with JavaScript only? ›

JavaScript frameworks are well-suited to mobile app development, as they can be used across a number of platforms, including iOS, Android, and Windows.

How to create a simple REST API using JavaScript and Node js? ›

Building a Node js REST API is a four-step process.
Follow the steps given below to build a secure Node js REST API:
  1. Step 1: Create the Required Directories.
  2. Step 2: Create your First App Express API.
  3. Step 3: Creating the User Module.
  4. Step 4: Creating the Auth Module.
Nov 3, 2021

Which language is best for CRUD app? ›

If you're implementing it as a simple register or stack machine, C is usually the language of choice.

How to create app with React and Node js? ›

An account at
  1. Step 1: Create your Node (Express) backend. First create a folder for your project, called react-node-app (for example). ...
  2. Step 2: Create an API Endpoint. ...
  3. Step 3: Create your React frontend. ...
  4. Step 4: Make HTTP Requests from React to Node. ...
  5. Step 5: Deploy your app to the web with Heroku.
Feb 3, 2021

What is a CRUD app and how do you build one? ›

CRUD apps are the user interface that we use to interact with databases through APIs. It is a specific type of application that supports the four basic operations: Create, read, update, delete. Broadly, CRUD apps consist of the database, the user interface, and the APIs.

What are the 7 CRUD actions? ›

The seven actions that perform our CRUD operations are index, new, create, show, edit, update, and destroy.

Which database is best for CRUD? ›

Relational Databases (SQL)
  • MariaDB.
  • MySQL.
  • SQL Server.
  • PostgreSQL.
  • Oracle.

What are the 7 CRUD methods? ›

CRUD is 4 distinct operations and there are seven RESTful actions. Create, Read, Update, Edit, Delete are CRUD actions. R of CRUD holds Index, New, Show, Edit and Edit, and Delete. The actions determine whether your consuming data, or feeding it, all the others are feeding it.

What is the difference between REST API and CRUD app? ›

In its base form, CRUD is a way of manipulating information, describing the function of an application. REST is controlling data through HTTP commands. It is a way of creating, modifying, and deleting information for the user. CRUD functions can exist in a REST API, but REST APIs are not limited to CRUD functions.

Is CRUD the same as REST API? ›

CRUD stands for Create, Read, Update, and Delete, which make up these four fundamental operations. Because REST API calls invoke CRUD operations, understanding their relationship with one another is important for API developers and data engineers.

Is a CRUD app an API? ›

CRUD stands for create, read, update, and delete. These functions are the four pillars of a complete CRUD API (and full-stack application, for that matter).

How to connect MySQL with nodejs and React? ›

How to implement a server for ReactJS and MySQL application
  1. Create the database to store our records.
  2. Create the server connection to the DB.
  3. Define the endpoints for the CRUD app.
  4. Create react app and define the frontend.
  5. Integrate the front end and backend.

How to build simple RESTful API with nodejs ExpressJs and MongoDB? ›

Steps to Build a REST API using Node Express MongoDB
  1. Step 1: Connecting to MongoDB Atlas.
  2. Step 2: Adding REST API CRUD Routes.
  3. Step 3: Setting Up the Front-End.
  4. Step 4: Testing the Application.
Feb 11, 2022

What are the 4 CRUD operations? ›

CRUD (Create, Read, Update, and Delete) is a basic requirement when working with database data.

How to create REST API for CRUD operations? ›

How to perform CRUD operations using REST API? Users can perform operations to Create/Read/Update/Delete data (CRUD operations) using REST API methods viz.
POST creates a new resource of the specified resource type.
  1. READ: To read resources in a REST environment, we use the GET method. ...
  2. UPDATE: ...
  3. DELETE:

Which web service uses basic CRUD? ›

RESTful Web Services

A REST web service uses HTTP and supports/repurposes several HTTP methods: GET, POST, PUT or DELETE. It also offers simple CRUD-oriented services.

What is simple CRUD stored procedure? ›

CRUD operation simply means to create, read, update and delete records in the database. A stored procedure also known as SP is a prepared SQL statements, that you can save in order to reuse. It act as a subroutine that can be execute to perform user predefined SQL statements.

How do you create a CRUD component? ›

  1. Creating a Simple Component Using the Template API.
  2. Combining Templates and Binders.
  3. Dynamically Adding Server-side Components to Templates.
  4. Using Model Beans.
  5. Using Model Encoders.
  6. Creating Contents Dynamically Based on Items List.
  7. Using Parent Layout.

What are all CRUD DataBase methods? ›

CRUD Operations in SQL
  • Create: In CRUD operations, 'C' is an acronym for create, which means to add or insert data into the SQL table. ...
  • Read: In CRUD operations, 'R' is an acronym for read, which means retrieving or fetching the data from the SQL table. ...
  • Update: ...
  • Delete:

How to create a DataBase without SQL? ›

Use Of Database Without Installing SQL Server Using Visual Studio
  1. Step: Open Visual Studio and select view option.
  2. Step: In the View menu open the “Server Explorer” ...
  3. Step: Create a DataBase using Add Connection. ...
  4. Step: In Add Connection, you will be provided the option to select and add any new connection of the database.
Apr 24, 2016

How to develop your own app? ›

How to make an app for beginners in 10 steps
  1. Generate an app idea.
  2. Do competitive market research.
  3. Write out the features for your app.
  4. Make design mockups of your app.
  5. Create your app's graphic design.
  6. Put together an app marketing plan.
  7. Build the app with one of these options.
  8. Submit your app to the App Store.

Which language is best for app development? ›

C++ is used for Android app development as well as development of native apps. It is the best choice for those who are just starting to develop any mobile app as C++ has a built-in and massive pool of ready-to-use libraries for your app development.

Which programming language should I learn first? ›

Python is one of the most chosen programming languages to learn first for its wide use and simplicity. It is a great stepping stone to learning more complex programming languages and frameworks!

How do I create a simple Node.js project? ›

Start a new Node.

js project we should run npm init to create a new package. json file for our project. Create a new empty directory in your development environment and run npm init . You'll then answer a few basic questions about your project, and npm will create a new package.

How do I create a simple REST API? ›

  1. Step 1: Create. Step 1.1: Create a project and add a REST API component. Step 1.2: Add a REST API component. Step 1.2: Design the REST API.
  2. Step 2: Deploy.
  3. Step 3: Test.
  4. Step 4: Manage.

How do I create a REST API for beginners? ›

How to Design a REST API
  1. Identify the Resources – Object Modeling. The first step in designing a REST API-based application is identifying the objects that will be presented as resources. ...
  2. Create Model URIs. ...
  3. Determine Resource Representations. ...
  4. Assigning HTTP Methods. ...
  5. More Actions.
Dec 30, 2022

How do you create a simple form in Reactjs? ›

In React, form data is usually handled by the components. When the data is handled by the components, all the data is stored in the component state. You can control changes by adding event handlers in the onChange attribute and that event handler will be used to update the state of the variable.

How do I create a simple search bar in react JS? ›

How to Create a Search Bar in React
  1. Create a fresh React app. ...
  2. Create a folder called components inside the /src folder of your app project. ...
  3. Create a functional component called *searchBar *using ES6 syntax. ...
  4. To the searchBar create a variable using the useState() hook.
Aug 2, 2022

How do I create a simple dashboard in react JS? ›

Let's get to it!
  1. Step 1: Setting up the React Dashboard project. To start with, let's clone the React Dashboard repository and choose a name for our new project. ...
  2. Step 2: Creating the dashboard and table. ...
  3. Step 3: Linking the local database to your application. ...
  4. Step 4: Testing the application.
Mar 1, 2022

How do I manually create a React app? ›

That's all we will need, let's get started...
  1. Create a Node project. Create a new folder, open it in VS Code terminal and run the following command. ...
  2. Install Babel dependencies. ...
  3. Install Webpack dependencies. ...
  4. Install HtmlWebpackPlugin. ...
  5. Install React dependencies. ...
  6. Add React files. ...
  7. configure Babel. ...
  8. configure Webpack.
Apr 18, 2022

How do I create a ReactJS project build? ›

How to create a Production build production for your React app?
  1. Step 1: Firstly, let us start: create a new React application.
  2. Step 2: Then navigate to the project folder.
  3. Step 3: Now, let us customize our app by editing the default code. ...
  4. Step 4: Run the application (development mode).
Feb 25, 2022

What is the first command to create a ReactJS application? ›

Setting up a React Environment

If you have npx and Node.js installed, you can create a React application by using create-react-app . If you've previously installed create-react-app globally, it is recommended that you uninstall the package to ensure npx always uses the latest version of create-react-app .

What are the 4 CRUD components? ›

CRUD is an acronym that comes from the world of computer programming and refers to the four functions that are considered necessary to implement a persistent storage application: create, read, update and delete.

Can I use react for a simple website? ›

ReactJS is Very Flexible

For example, you can use React whether you're building a website, web app, mobile app, or virtual reality applications.

How do I create a pop up menu in react JS? ›

import { useState ) from 'react'; import ClickAwayListener from 'react-click-away-listener'; const App = () => { const [popup, setPopup] = useState(false) return ( {/* The option to open the popup */} <button onClick={() => setPopup(true)}>Click Me</button> {/* The popup itself */} {popup && ( <ClickAwayListener ...

How do you implement search functionality in react JS? ›

Firstly, we import useState from react . Then, we import the Scroll and SearchList components. Next, in the Search function, we use the useState hook to initialise the value of the searchField state with useState("") (an empty string). After this, we use the filter function on the details list received from the parent.

How do I make a responsive dashboard in react JS? ›

All we have to do here is create our React app and install the necessary dependencies for our project.
  1. npx create-react-app admin-dashboard.
  2. cd admin-dashboard.
  3. npm i recharts.
  4. npm i @mui/material @emotion/react @emotion/styled.
  5. npm i react-router-dom.
Jun 7, 2022

Is React good for dashboards? ›

You can't go wrong with React. It's the most popular, simple, and powerful free UI library available. It's a perfect choice for enterprise applications, admin, and dashboards. You can use it to display and manipulate large chunks of data, with charts, data grids, gauges, and more.

How do I create a dynamic dashboard in react JS? ›

How to Create a Dynamic Dashboard in React
  1. A catalog of pre-defined configurable tile types.
  2. Tiles featuring arbitrary UI elements such as rich text, charts, grids, and gauges.
  3. Customizable dashboards that let users add, remove, reorder, and configure tiles.
  4. Touch screen, drag and drop functionality for mobile users.
Feb 5, 2021


1. Restful API with Node.js and MongoDB | Viraj Jain
(GeeksforGeeks Development)
2. Building an E-Commerce App using React | GeeksforGeeks
3. Javascript Basics - Essentials for ReactJS
4. Learn React and Django | Become a Full-Stack Master | GeeksforGeeks
5. Fetch data using Fetch API in React JS | Part-1 | React Basics
6. Master NodeJS from basics to advanced level | GeeksforGeeks Web Development


Top Articles
Latest Posts
Article information

Author: Catherine Tremblay

Last Updated: 05/21/2023

Views: 6868

Rating: 4.7 / 5 (67 voted)

Reviews: 90% of readers found this page helpful

Author information

Name: Catherine Tremblay

Birthday: 1999-09-23

Address: Suite 461 73643 Sherril Loaf, Dickinsonland, AZ 47941-2379

Phone: +2678139151039

Job: International Administration Supervisor

Hobby: Dowsing, Snowboarding, Rowing, Beekeeping, Calligraphy, Shooting, Air sports

Introduction: My name is Catherine Tremblay, I am a precious, perfect, tasty, enthusiastic, inexpensive, vast, kind person who loves writing and wants to share my knowledge and understanding with you.