The Wayback Machine - https://web.archive.org/web/20241027201412/https://www.geeksforgeeks.org/shopping-cart-app-using-react/
Open In App

Shopping Cart app using React

Last Updated : 02 Aug, 2024
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

In this article, we will create an Interactive and Responsive Shopping Cart Project Application using the famous JavaScript FrontEnd library ReactJS. We have named or Application as “GeeksforGeeks Shopping Cart“. The application or project which we have developed mainly focuses on the functional components and also, manages the various state of the application. The developed project provides the feature to the user to browse different products or items, add the items to their cart, and also process the purchases. Users can also see the real-time amount of their purchase, and they can be able to remove the product added to the cart efficiently.

Let’s have an interactive look at what our final project will look like:

IMAGE_1


Technologies Used/Pre-requisites:

Approach:

The given code presents the simple but functional full Shopping Cart project which we have named “GeeksforGeeks Shopping Cart“. This project is completely developed using ReactJS and styling is applied in CSS. The developed interface allows users to perform different activities that Amazon cart and Flipkart cart provides like browsing the courses, adding that course to their cart, removing the course, seeing the real-time purchase amount, and projecting to the checkout. Integration of different functionalities can be easily done in this application like adding a payment gateway or adding more products or courses.

Project Structure:

PS

The dependencies in package.json will look like this:

{
"name": "gfg-shopping-cart",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-scripts": "5.0.1",
"web-vitals": "^2.1.4"
},

Steps to create the application:

Step 1: Set up React project using the below command in VSCode IDE.

npx create-react-app <<name of project>>

Step 2: Navigate to the newly created project folder by executing the below command.

cd <<Name_of_project>>

Step 3: Create the components directory and create files SearchComponent.js, ShowCourseComponent.js, UserCartComponent.js

Example: Insert the below code in the App.js and App.css files mentioned in the above directory structure.

  • App.js: This file represents the main component of the Shopping Cart Application, managing the state and managing the entire logic of adding the course to the cart, removing, managing the amount, and checkout.
  • App.css: This file consists of all the styling code, whether it is h1 tag styling or cart empty message styling. All the look and feel of the application are specified in this styling file.
  • SearchComponent.jsx: This file code holds the logic of the search bar, from which the user can search specific courses.
  • ShowCourseComponent.jsx: This file consists of the code if showing the matched course as per the user input. In simple words, the card in which the course is been shown is rendered from this file.
  • UserCartComponent.jsx: This file holds the logic to the user cart. Here, by using different props, the added course can be removed, user can select a quantity and perform different functionalities.
CSS
/* App.css */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #ffffff;
}

.App-header {
    background-color: #6cc24a;
    padding: 20px;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.App-main {
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Search Component */
.search-bar {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    background-color: white;
    border-radius: 20px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
    padding: 5px 10px;
}

.search-bar input {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    background-color: #ffffff;
    transition: background-color 0.3s ease-in-out;
}

.search-bar input:focus {
    outline: none;
    background-color: #ffffff;
}

.search-icon {
    font-size: 1.2rem;
    margin-right: 10px;
    color: #6cc24a;
}

/* Product Display */
.product-list {
    flex: 2;
    display: flex;
    gap: 20px;
}

.product {
    background-color: rgb(255, 245, 245);
    border: 1px solid #1b4e1f;
    border-radius: 10%;
    padding: 10px 60px;
    text-align: center;
    width: 33%;
    transition: transform 0.2s ease-in-out;
    cursor: pointer;
    overflow: hidden;
    position: relative;
}

.product:hover {
    transform: translateY(-5px) scale(1.03);
}

.product img {
    max-width: 150px;
    /* Increased image size */
    height: auto;
    margin-bottom: 10px;
    border-radius: 50%;
    box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.2);
    /* Enhanced box shadow */
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    /* Added box shadow transition */
}

.product:hover img {
    transform: scale(1.1);
    z-index: 1;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.3);
    /* Enhanced box shadow on hover */
}

.product h2 {
    font-size: 1.5rem;
    margin: 10px 0;
    color: #323754;
}

.product p {
    font-size: 1.1rem;
    color: #777;
    margin: 5px 0;
}

/* Cart Checkout */
.cart {
    flex: 1;
    min-width: 300px;
    margin-top: 3%;
    background-color: #fff9e6;
    border: 2px solid #193d10;
    border-radius: 20px;
    padding: 10px 20px;
    box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.1);
    display: none;
    position: sticky;
    top: 20px;
}

.cart.active {
    display: block;
}

.cart h2 {
    font-size: 1.8rem;
    color: #323754;
    margin-top: 0;
    text-align: center;
}

.cart ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cart-item {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    margin: 15px 0;
    padding: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.cart-item .item-image img {
    max-width: 90px;
    height: auto;
    margin-right: 20px;
    border-radius: 50%;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-in-out;
}

.cart-item .item-image img:hover {
    transform: scale(1.1);
}

.cart-item .item-details {
    flex: 1;
    display: inline;
}

.cart-item h3 {
    display: inline;
    font-size: 1.4rem;
    margin: 0;
    color: #323754;
}

.cart-item p {
    font-size: 1.1rem;
    color: #777;
    margin: 5px 0;
}

.cart-item .item-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.cart-item .item-actions button {
    background-color: #6cc24a;
    border: none;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s ease-in-out;
    font-size: 1rem;

}

.cart-item .item-actions button:hover {
    background-color: #449e30;
}

.cart-item .quantity {
    display: flex;
    flex-direction: row;
    margin-left: 15px;
    font-size: 1rem;
    color: #323754;
}

.cart .total {
    font-size: 1.4rem;
    margin: 20px 0;
    text-align: right;
    color: #323754;
}

.cart .checkout-button {
    background-color: #6cc24a;
    border: none;
    color: white;
    padding: 10px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s ease-in-out;
    font-size: 1.2rem;
    float: left;
}

.cart .checkout-button:hover {
    background-color: #449e30;
}

.checkout-message {
    font-size: 1.4rem;
    margin-top: 30px;
    color: #6cc24a;
    text-align: center;
}

.no-results,
.empty-cart {
    text-align: center;
    font-size: 1.4rem;
    color: #777;
    margin-top: 20px;
}

@media screen and (max-width: 768px) {
    .App-main {
        flex-direction: column;
        align-items: center;
    }

    .product-list {
        width: 100%;
        margin-bottom: 5px;
    }

    .product {
        width: 50%;
    }

    .cart {
        min-width: unset;
        margin-top: 30px;
    }
}

.add-to-cart-button {
    background-color: #6cc24a;
    border: none;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s ease-in-out;
    font-size: 1rem;
}

.add-to-cart-button:hover {
    background-color: #449e30;
}

.item-info {
    display: flex;
    flex-direction: row;
}

.item-details {
    margin-top: 4%;
}

.item-actions .quantity p {
    margin: 10% 10%;
}

.product-list {
    padding-bottom: 5%;
    border-bottom: 2px solid green;
}

.checkout-section {
    float: right;
    margin: 0;
}

.checkout-section .checkout-button {
    background-color: #323754;
}

.checkout-section .checkout-button:hover {
    background-color: #4c5cb6;
}
JavaScript
//App.js

import React, { useState } from 'react';
import './App.css';
import SearchComponent from './components/SearchComponent';
import ShowCourseComponent from './components/ShowCourseComponent';
import UserCartComponent from './components/UserCartComponent';

function App() {
    const [courses, setCourses] = useState([
        { id: 1, 
        name: 'GFG T-shirt', 
        price: 499, 
        image: 
'https://media.geeksforgeeks.org/wp-content/uploads/20230823165506/gfg1.png'
        },
        { id: 2, 
        name: 'GFG Bag', 
        price: 699, 
        image: 
'https://media.geeksforgeeks.org/wp-content/uploads/20230823165553/gfg2.jpg'
        },
        { id: 3, 
        name: 'GFG Hoodie', 
        price: 799, 
        image: 
'https://media.geeksforgeeks.org/wp-content/uploads/20230823165623/gfg3.jpg'
        }
    ]);

    const [cartCourses, setCartCourses] = useState([]);
    const [searchCourse, setSearchCourse] = useState('');

    const addCourseToCartFunction = (GFGcourse) => {
        const alreadyCourses = cartCourses
                            .find(item => item.product.id === GFGcourse.id);
        if (alreadyCourses) {
            const latestCartUpdate = cartCourses.map(item =>
                item.product.id === GFGcourse.id ? { 
                ...item, quantity: item.quantity + 1 } 
                : item
            );
            setCartCourses(latestCartUpdate);
        } else {
            setCartCourses([...cartCourses, {product: GFGcourse, quantity: 1}]);
        }
    };

    const deleteCourseFromCartFunction = (GFGCourse) => {
        const updatedCart = cartCourses
                            .filter(item => item.product.id !== GFGCourse.id);
        setCartCourses(updatedCart);
    };

    const totalAmountCalculationFunction = () => {
        return cartCourses
            .reduce((total, item) => 
                        total + item.product.price * item.quantity, 0);
    };

    const courseSearchUserFunction = (event) => {
        setSearchCourse(event.target.value);
    };

    const filterCourseFunction = courses.filter((course) =>
        course.name.toLowerCase().includes(searchCourse.toLowerCase())
    );

    return (
        <div className="App">
            <SearchComponent searchCourse={searchCourse} 
                            courseSearchUserFunction=
                                {courseSearchUserFunction} />
            <main className="App-main">
                <ShowCourseComponent
                    courses={courses}
                    filterCourseFunction={filterCourseFunction}
                    addCourseToCartFunction={addCourseToCartFunction}
                />

                <UserCartComponent
                    cartCourses={cartCourses}
                    deleteCourseFromCartFunction={deleteCourseFromCartFunction}
                    totalAmountCalculationFunction={
                        totalAmountCalculationFunction
                    }
                    setCartCourses={setCartCourses}
                />
            </main>
        </div>
    );
}

export default App;
JavaScript
//components/SearchComponent.js
import React from 'react';

function SearchComponent({ searchCourse, courseSearchUserFunction }) {
    return (
        <header className="App-header">
            <h1>GeeksforGeeks Shopping Cart</h1>
            <div className="search-bar">
                <input
                    type="text"
                    placeholder="Search for GFG Products..."
                    value={searchCourse}
                    onChange={courseSearchUserFunction}
                />
            </div>
        </header>
    );
}

export default SearchComponent;
JavaScript
//components/ShowCourseComponent.js
import React from 'react';

function ShowCourseComponent({ courses, 
    filterCourseFunction, 
    addCourseToCartFunction }) {
    return (
        <div className="product-list">
            {filterCourseFunction.length === 0 ? (
                <p className="no-results">
                    Sorry Geek, No matching Product found.
                </p>
            ) : (
                filterCourseFunction.map((product) => (
                    <div className="product" key={product.id}>
                        <img src={product.image} alt={product.name} />
                        <h2>{product.name}</h2>
                        <p>Price: â‚đ{product.price}</p>
                        <button
                            className="add-to-cart-button"
                            onClick={() => addCourseToCartFunction(product)}
                        >
                            Add to Shopping Cart
                        </button>
                    </div>
                ))
            )}
        </div>
    );
}

export default ShowCourseComponent;
JavaScript
//components/UserCartComponent.js

import React from 'react';

function UserCartComponent({
    cartCourses,
    deleteCourseFromCartFunction,
    totalAmountCalculationFunction,
    setCartCourses,
}) {
return (
<div className={`cart ${cartCourses.length > 0 ? 'active' : ''}`}>
    <h2>My Cart</h2>
    {cartCourses.length === 0 ? (
    <p className="empty-cart">Geek, your cart is empty.</p>
    ) : (
<div>
    <ul>
        {cartCourses.map((item) => (
            <li key={item.product.id} className="cart-item">
                <div>
                    <div className="item-info">
                        <div className="item-image">
                            <img src={item.product.image} 
                                alt={item.product.name} />
                        </div>
                        <div className="item-details">
                            <h3>{item.product.name}</h3>
                            <p>Price: â‚đ{item.product.price}</p>
                        </div>
                    </div>
                    <div>
                        <div className="item-actions">
                            <button
                                className="remove-button"
                                onClick={() => 
                                deleteCourseFromCartFunction(item.product)}>
                                Remove Product
                            </button>
                            <div className="quantity">
                                <button style={{ margin: "1%" }} 
                                    onClick={(e) => {
                                    setCartCourses((prevCartCourses) => {
                                        const updatedCart = prevCartCourses.map(
                                        (prevItem) =>
                                        prevItem.product.id === item.product.id
                                                ? { ...prevItem, quantity: 
                                                item.quantity + 1 }
                                                : prevItem
                                        );
                                        return updatedCart;
                                    })
                                }}>+</button>
                                <p className='quant'>{item.quantity} </p>
                                <button 
                                    onClick={(e) => {
                                    setCartCourses((prevCartCourses) => {
                                        const updatedCart = prevCartCourses.map(
                                        (prevItem) =>
                                        prevItem.product.id === item.product.id
                                                ? { ...prevItem, quantity:
                                                Math.max(item.quantity - 1, 0) }
                                                : prevItem
                                        );
                                        return updatedCart;
                                    })
                                }}>-</button>
                            </div>
                        </div>
                    </div>
                </div>
            </li>
        ))}
    </ul>
    <div className="checkout-section">
        <div className="checkout-total">
            <p className="total">Total Amount: 
                â‚đ{totalAmountCalculationFunction()}
            </p>
        </div>
        <button
            className="checkout-button"
            disabled={cartCourses.length === 0 || 
            totalAmountCalculationFunction() === 0}
        >
            Proceed to Payment
        </button>
    </div>
</div>
            )}
</div>
    );
}

export default UserCartComponent;

Steps to run the application:

1. Run the application by executing the following command in the terminal.

npm start

2. Open a web browser like Chrome or Firefox and type the following URL in the address bar.

http://localhost:3000/

Output:



Previous Article
Next Article

Similar Reads

Shopping Cart Project Using C Language
Online Shopping applications are one of the favorite applications out of all online applications. It is a very much used application in everyone's life. So, Let's try to create a Shopping cart using C language which can perform basic tasks for us. The functionality of the Shopping Cart Although online Shopping has many functionalities we can't incl
11 min read
Unstated Next - Lightweight State Management Library For ReactJS | Part - 2 | Shopping Cart
In the previous published article, we have explained everything you need to know about Unstated Next that recommends you to read that article if you haven't. In this article, we are going to build a simple shopping cart application having the functionality to add, remove, update and display any item in the cart. Prerequisite: Have basic knowledge a
4 min read
Create a shopping cart application and test case execution based on ReactJS
ReactJS has gained significant popularity among developers for its efficient and reusable components, making it an ideal choice for building interactive and dynamic web applications. In this article, we will explore how to create a shopping cart application using ReactJS and discuss the importance of test case execution for ensuring the quality of
8 min read
How to create Shopping Cart Button in ReactJS?
A shopping cart button is one of the most used component in e-commerce websites or applications which allows users to add items to their cart . In this tutorial, we will learn how to create a shopping cart button in ReactJS using Material-UI.  PrerequisitesJavaScript and JSXReact JSSteps to create React Application And Installing Required Modules:S
3 min read
Unstated Next - Lightweight State Management Library For ReactJS | Part - 3 | Shopping Cart
We have implemented a shopping cart using Unstated Next In this article we are gonna learn how to handle states of more than one component in a React application using Unstated Next. Prerequisites:NodeJS or NPMReact JSSteps to Create the React Application And Installing Module:Step 1: Create a new react app. npx create-react-app shopping-cartStep 2
5 min read
Design the Shopping Cart for a MERN Stack E-Commerce Website
E-commerce shopping carts are critical components of online retail platforms, enabling users to review selected items, adjust quantities, and proceed to checkout. Here are some key features and best practices for designing a shopping cart: Approach to Implement Shopping Cart for an E-CommerceUse useParams to get the product ID.Fetch product details
6 min read
Implementing Add to Cart functionality using Redux toolkit in React
Add To Cart functionality is one of the important components of the E-commerce platform. In this article, we are going to learn how to implement Add to Cart functionality using React JS and Redux Toolkit. Preview of final output: Let us have a look at how the final output will look like. Prerequisites React JS React Redux Approach to implement Add
5 min read
Create Shopping Carts using React and Tailwind CSS
In this article, we will create a Shopping Cart using React and Tailwind CSS, allowing users to browse through products, add items to their cart, view their cart, and adjust quantities. We will enhance the user experience by integrating React Icons for aesthetic and functional icons like Add to Cart or Remove Item. PrerequisitesReact.jsTailwind CSS
5 min read
How to Add Cart in a Web Page using Django?
Adding a shopping cart to a web page using Django is a crucial step when building an e-commerce website or any other application that involves online transactions. A shopping cart allows users to collect and manage items they want to purchase before proceeding to checkout. In this tutorial, we'll walk you through the process of creating a basic sho
6 min read
Create a New React App - npm create-react-app
The create react app command allows us to create a development environment and install all necessary libraries for creating single-page applications using React. The CRA tool is used to set up a new React project quickly, providing a standard structure and configuration. It includes a development server, build scripts, and support for modern JavaSc
3 min read
How to Create "Add to cart" Button in Bootstrap?
Creating an "Add to Cart" button in Bootstrap is simple and helps improve the shopping experience on your website. Bootstrap has ready-made styles that make it easy to create buttons that look good and work well on all devices. Approach to creating an "Add to cart" Button in BootstrapUse a Bootstrap container to hold your content. This helps with r
2 min read
Project Idea | Shopping Made Easy
Project Title: Shopping Made Easy Introduction: Today, shopping in a supermarket store requires standing in a long queue for billing. This leads to a lot of time wastage. To counter this problem, we have come up with a solution that utilizes easily available technology to ease this process. Conceptual framework: Design and methods to be used First,
2 min read
Project Idea | ShoppingLane Online Shopping Website
This project is regarding a very simple idea, but yet, important and quite helpful to society. Here, we are planning to build an E-commerce (online shopping) website. The name of the website will be "ShoppingLane". We all know that the business-to-consumer aspect of product commerce is the most visible business use of the World Wide Web. The primar
4 min read
Semantic-UI Icon Set Payments & Shopping
Semantic UI is an open-source development framework that provides pre-defined classes to make our website look beautiful, amazing, and responsive. It is similar to Bootstrap which has predefined classes. It uses jQuery and CSS to create the interfaces. It can also be directly used via CDN like bootstrap. Semantic UI provides the users with various
5 min read
Building a Shopping List with VueJS
The following approach covers how to build a simple shopping list app with VueJs. Vue (or Vue.js) is an open-source JavaScript framework geared towards building user interfaces, it was created by Evan You. Prerequisites: Basic understanding of HTML.Basic knowledge of CSSBasic knowledge of JavaScriptIncluding Script: We can include the Vue Js into o
3 min read
Building a react boilerplate from scratch without using create-react-app
In this article, we are going to build a basic boilerplate for a React project from scratch without using the create-react-app or any other predefined boilerplate. This is a great experience for any react developer to look into what is happening behind the scenes. The file structure for our project will be looking like the following. You will under
7 min read
Plugin "react" was conflicted between "package.json Âŧ eslint-config-react-app
The error Plugin "react" was conflicted between package.json and eslint-config-react-app generally arises when there is a conflict in naming convention or package.json data. However, this is not the only reason for this conflict. Some of the other reasons can be due to a different version or conflict in project dependencies. Error image from Termin
2 min read
How To Test React App With Jest and React Testing Library?
Jest is a JavaScript testing framework maintained by Facebook, designed with a focus on simplicity and support for large JavaScript applications, especially React. It offers built-in utilities like test runners, mocking, snapshot testing, and code coverage reporting. React Testing Library (RTL) is a lightweight solution for testing React components
3 min read
Deploying Your Web App using Azure App Service
Pre-requisite: Introduction to Microsoft Azure | A cloud computing service The majority of Computer Science students start with Web Development or Machine Learning. Now after learning how to create a website, we should learn to deploy it online. By deploying our website, we can share it with others, perform alpha or beta testing, perform live chang
4 min read
Introduction to Xamarin | A Software for Mobile App Development and App Creation
The entire world is now surrounded by billions and trillions of mobile Tech which is inevitable. The major share of the development of mobile apps is taken by the Google's Android, Apple's iOS, and Microsoft's Windows. Every new learner or newbie in Mobile Development Domain finds himself in the dilemma of choosing the platform to start with. They
9 min read
Progressive Web App - A Combination of Native and Web App
Web is a wonderful platform. Its omnipresent across devices and operating systems, its user-centered security model, and the fact that neither its specification nor its implementation is maintained by a single company or organization make the web a unique and promising platform to develop software or applications on. In addition to that with its in
9 min read
Difference between Mobile App Testing and Web App Testing
Mobile App Testing: Mobile app testing refers to process of testing application software simply for controlling and handling mobile devices. It is used to test mobile app for its functionality, usability, compatibility, etc. Web App Testing: Web app testing refers to process of testing application software hosted on web to ensure quality, functiona
3 min read
Difference between app.get() and app.post() in Express.js.
In ExpressJS, app.get() and app.post() are two different methods used to handle HTTP requests but for different purposes. app.get() in ExpressJS:app.get() is used to handle incoming GET requests. GET requests are commonly used for fetching data from the server. For example, when you open a website in your browser, you are making a GET request to re
2 min read
What is the difference between ng-app and data-ng-app in AngularJS ?
In web application development, AngularJS is one of the most favorite dynamic JavaScript frameworks that has HTML through script tags, enabling us to augment the HTML attributes using the directives and facilitating the data binding through the expressions. In this article, we will see the concepts of ng-app and data-ng-app in AngularJS. As these a
5 min read
Difference between app.use() and app.get() in Express.js
Express.js, a popular web application framework for Node.js, provides a powerful set of methods for routing HTTP requests. Among these methods, app.use() and app.get() are two fundamental functions that serve different purposes. Understanding their differences is essential for building efficient and well-structured Express applications. Prerequisit
4 min read
PWA (Progressive Web App) vs Native App
Progressive Web Apps (PWA) and Native Apps are two different design solutions when it comes to the world of mobile & web development. PWAs (Progressive Web Apps): Native apps that run in the web browser of your choice and deploy some native ones, a middle ground between full-on websites and device-specific experiences. Table of Content What is
5 min read
Android & iOS App development using React Native with Expo
EXPO! How Expo differs from React Native? Should I start my project with Expo? Many questions arise in newbies mind when he/she wants to get a start in the app development journey. But, you are lucky as you have landed in the right place. I will try my best to explain everything in a simple manner. As per official documentation of React Native, it
6 min read
What are the advantages of using create-react-app CLI ?
Introduction: To get started with any framework you need to understand what all files you need to install. With React you don't need to worry about this. React will install all the files required for you to get started with a single command. It will have all the necessary packages installed and you can start rendering and building your project at o
3 min read
How to Deploy React App on Netlify Using Github?
React App is a web or mobile application that is built using the React library of JavaScript. It helps users create interactive, single-page, and dynamic applications. These applications are built using HTML, CSS, and JavaScript. Deployment of a React app can be done via GitHub, Netlify, or any other deployment platform. GitHub has its gh-pages, wh
6 min read
Create an OTP Generator and Validator App using React-Native
One-time passwords (OTPs) have become a popular choice for enhancing the security of various online services and applications. In this article, we'll explore how to create an OTP Generator and Validator App using React Native, a popular framework for building cross-platform mobile applications. Preview of final output: Let us have a look at how the
4 min read
three90RightbarBannerImg