Build an E-commerce Website using Gatsby and Cosmic JS

Build an E-commerce Website using Gatsby and Cosmic JS

This tutorial will show you how to build an e-commerce app using Gatsby and Cosmic JS.

This tutorial will show you how to build an e-commerce app using Gatsby and Cosmic JS.

This app will give you a basic idea of how we can integrate an e-commerce app with Cosmic JS to store our data. In this app example, all order data will be stored in the Cosmic JS database and its speed will charm you. Let’s get started.

Check out the demo

Download the codebase

Introduction to the App

Here we are building an e-commerce app in Gatsby with the backend power of Cosmic JS. We will make some navigation based on an e-commerce website and at the end placed order will be saved on the Cosmic JS database. Cosmic JS provides npm module for JavaScript technologies. Also, it provides API endpoints with the help of which you can directly apply CRUD operations on it. Here we are using API endpoints to store our data.

Requirements

  • Node.js must be installed on your system, it is required to run npm commands. Choose its latest version and install it on your system.
  • After node.js, install Gatsby CLI on your system globally. You can find it here: Gatsby CLI

    Let’s Get Started

We assumed that you have installed the above software and CLI. Now run the following command to create a new Gatsby app:

gatsby new Gatsby-Ecommerce

After executing this command successfully, it is ensured that you have created a new Gatsby app with the name “Gatsby-Ecommerce”. Now to start this, execute the following command from the terminal:

npm start

It will run your app and opens the port: http://localhost:8000/

Configuration with Cosmic JS

Cosmic JS is two in one service provider that means it gives the facility of database and server as well. So you need to signup for Cosmic JS first and create a new bucket with any name you want, here we created the bucket with the name Gatsby Ecommerce. Now it is time to create an object type, which means to the data management. Create object type named orders, All orders will be stored in this object. Now we have to do some basic setting, for this goto basic setting in your dashboard. Have a look at the below screenshot:

Here you can see the read/write keys fields and other IDs. Click on generate read and write keys and save on any text file along with bucket ID and slug.

Now open your Gatsby project in any IDE, here I’m using Visual Basic Code. Now create a folder named config in root od the project and create a new file with name config.js inside the config folder and save the above IDs and keys in the following format:

const config = {
    bucket_name: process.env.GATSBY_APP_BUCKET_SLUG || "Gatsby Ecommerce",
    bucket_slug: process.env.GATSBY_APP_BUCKET_SLUG || "gatsby-ecommerce",
    bucket_id: process.env.GATSBY_APP_BUCKET_ID || "5cc1ead2516526548dab945e",
    read_key: process.env.GATSBY_APP_BUCKET_READ_KEY || "",
    write_key: process.env.GATSBY_APP_BUCKET_WRITE_KEY || "",
    url: "https://api.cosmicjs.com/v1/"
  }
  export default config;

It is important for you to manage your project properly, so have a look at the screenshot of the folder structure of the project:

Inbuilt Bucket

You can also use an inbuilt bucket. For this, you have to import that inbuilt bucket in your Cosmic JS account. Here we are providing our bucket for you. You just need to follow these steps:

  1. Go to our Git repo and download the bucket.json file
  2. Now go to your Cosmic JS dashboard and click on basic settings
  3. Click on Import/Export and click on Add import file, and import the bucket.json file

Now everything is ready, we can move to implement our app now

Home Page

Now we are going to build our app, and the main page is the home page. On this page, we will show the items for shopping. We will add a few items as this app will only show you the compatibility of Gatsby e-commerce app with Cosmic JS. Location of the home component is src/components/home.js

Check the code of the home component, then we will explain it.

import React, { Component } from 'react';
import Iphone8 from "./iPhones/iphone8"
import Iphonex from "./iPhones/iphonex"
import Iphonexs from "./iPhones/iphonexs"
import "./layout.css";
import { Modal, Button } from 'react-bootstrap';
import { Link } from "gatsby";
import _ from "lodash";

class Home extends Component {
    products = [];
    constructor(props) {
        super(props);
        this.state = {
            iPhone8Show: false,
            iPhoneXShow: false,
            iPhoneXSShow: false,
            alert: "",
        };
        this.handleiPhone8Show = this.handleiPhone8Show.bind(this);
        this.handleiPhone8Close = this.handleiPhone8Close.bind(this);
        this.handleiPhoneXShow = this.handleiPhoneXShow.bind(this);
        this.handleiPhoneXClose = this.handleiPhoneXClose.bind(this);
        this.handleiPhoneXSShow = this.handleiPhoneXSShow.bind(this);
        this.handleiPhoneXSClose = this.handleiPhoneXSClose.bind(this);
    }

    handleiPhone8Close() {
        this.setState({ iPhone8Show: false });
      }

      handleiPhone8Show() {
        this.setState({ iPhone8Show: true });
      }
      handleiPhoneXClose() {
        this.setState({ iPhoneXShow: false });
      }

      handleiPhoneXShow() {
        this.setState({ iPhoneXShow: true });
      }
      handleiPhoneXSClose() {
        this.setState({ iPhoneXSShow: false });
      }

      handleiPhoneXSShow() {
        this.setState({ iPhoneXSShow: true });
      }

    //   Add products to cart
      addToCart = (e)=>
      {
        var product = e.target.value;
        this.setState({alert: "Product Added to Cart"});
        setTimeout(
            function() {
                this.setState({alert: ""});
            }
            .bind(this),
            3000
        );
            this.products.push(product);
            localStorage.setItem('products', JSON.stringify(this.products))
      }

      componentDidMount()
      {
        var arr = _.values(JSON.parse(localStorage.getItem('products')));
        if(arr.length > 0)
        {
        this.products = JSON.parse(localStorage.getItem('products'));
        }
      }

    render() {
        return (

            <div>
                 <p>{this.state.alert}</p>
             <div className="row">
             <div className="col-sm-5"></div>
             <div className="col-sm-4"></div>
             <div className="col-sm-2 cart"><Link to="/cart/"><button className="btn btn-primary margin-button">
            View Cart</button></Link>
                </div>               

             </div>

            <div className="row top-row-margin">
            <div className="col-sm-4 image-pointer" onClick={this.handleiPhone8Show}>
            <Iphone8/>
                </div>
                <div className="col-sm-4 image-pointer" onClick={this.handleiPhoneXShow}>
            <Iphonex/>
                </div>
                <div className="col-sm-4 image-pointer" onClick={this.handleiPhoneXSShow}>
            <Iphonexs/>
                </div>
                </div>
                <div className="row">
                 <div className="col-sm-4 product-name" onClick={this.handleiPhone8Show}>$849</div>
                 <div className="col-sm-4 product-name" onClick={this.handleiPhoneXShow}>import React, { Component } from 'react';
import Iphone8 from "./iPhones/iphone8"
import Iphonex from "./iPhones/iphonex"
import Iphonexs from "./iPhones/iphonexs"
import "./layout.css";
import { Modal, Button } from 'react-bootstrap';
import { Link } from "gatsby";
import _ from "lodash";

class Home extends Component {
    products = [];
    constructor(props) {
        super(props);
        this.state = {
            iPhone8Show: false,
            iPhoneXShow: false,
            iPhoneXSShow: false,
            alert: "",
        };
        this.handleiPhone8Show = this.handleiPhone8Show.bind(this);
        this.handleiPhone8Close = this.handleiPhone8Close.bind(this);
        this.handleiPhoneXShow = this.handleiPhoneXShow.bind(this);
        this.handleiPhoneXClose = this.handleiPhoneXClose.bind(this);
        this.handleiPhoneXSShow = this.handleiPhoneXSShow.bind(this);
        this.handleiPhoneXSClose = this.handleiPhoneXSClose.bind(this);
    }

    handleiPhone8Close() {
        this.setState({ iPhone8Show: false });
      }

      handleiPhone8Show() {
        this.setState({ iPhone8Show: true });
      }
      handleiPhoneXClose() {
        this.setState({ iPhoneXShow: false });
      }

      handleiPhoneXShow() {
        this.setState({ iPhoneXShow: true });
      }
      handleiPhoneXSClose() {
        this.setState({ iPhoneXSShow: false });
      }

      handleiPhoneXSShow() {
        this.setState({ iPhoneXSShow: true });
      }

    //   Add products to cart
      addToCart = (e)=>
      {
        var product = e.target.value;
        this.setState({alert: "Product Added to Cart"});
        setTimeout(
            function() {
                this.setState({alert: ""});
            }
            .bind(this),
            3000
        );
            this.products.push(product);
            localStorage.setItem('products', JSON.stringify(this.products))
      }

      componentDidMount()
      {
        var arr = _.values(JSON.parse(localStorage.getItem('products')));
        if(arr.length > 0)
        {
        this.products = JSON.parse(localStorage.getItem('products'));
        }
      }

    render() {
        return (

            <div>
                 <p>{this.state.alert}</p>
             <div className="row">
             <div className="col-sm-5"></div>
             <div className="col-sm-4"></div>
             <div className="col-sm-2 cart"><Link to="/cart/"><button className="btn btn-primary margin-button">
            View Cart</button></Link>
                </div>               

             </div>

            <div className="row top-row-margin">
            <div className="col-sm-4 image-pointer" onClick={this.handleiPhone8Show}>
            <Iphone8/>
                </div>
                <div className="col-sm-4 image-pointer" onClick={this.handleiPhoneXShow}>
            <Iphonex/>
                </div>
                <div className="col-sm-4 image-pointer" onClick={this.handleiPhoneXSShow}>
            <Iphonexs/>
                </div>
                </div>
                <div className="row">
                 <div className="col-sm-4 product-name" onClick={this.handleiPhone8Show}>$849</div>
                 <div className="col-sm-4 product-name" onClick={this.handleiPhoneXShow}>$1149</div>
                 <div className="col-sm-4 product-name" onClick={this.handleiPhoneXSShow}>$1449</div>                
                </div>
                <div className="row">
                 <div className="col-sm-4 product-name" onClick={this.handleiPhone8Show}>iPhone 8</div>
                 <div className="col-sm-4 product-name" onClick={this.handleiPhoneXShow}>iPhone X</div>
                 <div className="col-sm-4 product-name" onClick={this.handleiPhoneXSShow}>iPhone XS</div>                
                </div>
                <div className="row">
                 <div className="col-sm-4 product-name"><button className="btn btn-primary margin-button" onClick={this.addToCart} value={"iphone8"}>Add to Cart</button></div>
                 <div className="col-sm-4 product-name"><button className="btn btn-primary margin-button" onClick={this.addToCart} value={"iphoneX"}>Add to Cart</button></div>
                 <div className="col-sm-4 product-name"><button className="btn btn-primary margin-button" onClick={this.addToCart} value={"iphoneXS"}>Add to Cart</button></div>               
                </div>




            {/* Modal for iPhone 8 info */}
        <Modal show={this.state.iPhone8Show} onHide={this.handleiPhone8Close}>
          <Modal.Header closeButton>
            <Modal.Title>Apple iPhone 8</Modal.Title>
          </Modal.Header>
          <Modal.Body>
              <p><span>Announced:</span> <span className="modal-float-right">2017, September</span></p>
              <p><span>Display:</span> <span className="modal-float-right">4.7 inches, 60.9 cm2</span></p>
              <p><span>OS:</span> <span className="modal-float-right">iOS 11, Upgradable</span></p>
              <p><span>Memory:</span> <span className="modal-float-right">64/256 GB, 2GB RAM</span></p>
              <p><span>Battery:</span> <span className="modal-float-right">Li-Ion 1821mAh</span></p>
              <p><span>Price:</span> <span className="modal-float-right">$849</span></p>


          </Modal.Body>
          <Modal.Footer>
            <Button variant="primary" onClick={this.handleiPhone8Close} className="margin-button">
              Close
            </Button>
          </Modal.Footer>
        </Modal>

        {/* Modal for iPhone x */}
        <Modal show={this.state.iPhoneXShow} onHide={this.handleiPhoneXClose}>
          <Modal.Header closeButton>
            <Modal.Title>Apple iPhone X</Modal.Title>
          </Modal.Header>
          <Modal.Body>
              <p><span>Announced:</span> <span className="modal-float-right">2017, September</span></p>
              <p><span>Display:</span> <span className="modal-float-right">5.8 inches, 84.4 cm2</span></p>
              <p><span>OS:</span> <span className="modal-float-right">iOS 11.1.1, upgradable</span></p>
              <p><span>Memory:</span> <span className="modal-float-right">64/256 GB, 3 GB RAM</span></p>
              <p><span>Battery:</span> <span className="modal-float-right">Li-Ion 2716 mAh</span></p>
              <p><span>Price:</span> <span className="modal-float-right">$1149</span></p>


          </Modal.Body>
          <Modal.Footer>
            <Button variant="primary" onClick={this.handleiPhoneXClose} className="margin-button">
              Close
            </Button>
          </Modal.Footer>
        </Modal>

         {/* Modal for iPhone xs */}
         <Modal show={this.state.iPhoneXSShow} onHide={this.handleiPhoneXSClose}>
          <Modal.Header closeButton>
            <Modal.Title>Apple iPhone XS</Modal.Title>
          </Modal.Header>
          <Modal.Body>
              <p><span>Announced:</span> <span className="modal-float-right">2018, September</span></p>
              <p><span>Display:</span> <span className="modal-float-right">5.8 inches, 84.4 cm2</span></p>
              <p><span>OS:</span> <span className="modal-float-right">iOS 12, upgradable</span></p>
              <p><span>Memory:</span> <span className="modal-float-right">64/256/512 GB,4GBRAM</span></p>
              <p><span>Battery:</span> <span className="modal-float-right">Li-Ion 2658 mAh</span></p>
              <p><span>Price:</span> <span className="modal-float-right">$1449</span></p>


          </Modal.Body>
          <Modal.Footer>
            <Button variant="primary" onClick={this.handleiPhoneXSClose} className="margin-button">
              Close
            </Button>
          </Modal.Footer>
        </Modal>


                </div>
        )}
}

export default Home;
149</div>
                 <div className="col-sm-4 product-name" onClick={this.handleiPhoneXSShow}>import React, { Component } from 'react';
import Iphone8 from "./iPhones/iphone8"
import Iphonex from "./iPhones/iphonex"
import Iphonexs from "./iPhones/iphonexs"
import "./layout.css";
import { Modal, Button } from 'react-bootstrap';
import { Link } from "gatsby";
import _ from "lodash";

class Home extends Component {
    products = [];
    constructor(props) {
        super(props);
        this.state = {
            iPhone8Show: false,
            iPhoneXShow: false,
            iPhoneXSShow: false,
            alert: "",
        };
        this.handleiPhone8Show = this.handleiPhone8Show.bind(this);
        this.handleiPhone8Close = this.handleiPhone8Close.bind(this);
        this.handleiPhoneXShow = this.handleiPhoneXShow.bind(this);
        this.handleiPhoneXClose = this.handleiPhoneXClose.bind(this);
        this.handleiPhoneXSShow = this.handleiPhoneXSShow.bind(this);
        this.handleiPhoneXSClose = this.handleiPhoneXSClose.bind(this);
    }

    handleiPhone8Close() {
        this.setState({ iPhone8Show: false });
      }

      handleiPhone8Show() {
        this.setState({ iPhone8Show: true });
      }
      handleiPhoneXClose() {
        this.setState({ iPhoneXShow: false });
      }

      handleiPhoneXShow() {
        this.setState({ iPhoneXShow: true });
      }
      handleiPhoneXSClose() {
        this.setState({ iPhoneXSShow: false });
      }

      handleiPhoneXSShow() {
        this.setState({ iPhoneXSShow: true });
      }

    //   Add products to cart
      addToCart = (e)=>
      {
        var product = e.target.value;
        this.setState({alert: "Product Added to Cart"});
        setTimeout(
            function() {
                this.setState({alert: ""});
            }
            .bind(this),
            3000
        );
            this.products.push(product);
            localStorage.setItem('products', JSON.stringify(this.products))
      }

      componentDidMount()
      {
        var arr = _.values(JSON.parse(localStorage.getItem('products')));
        if(arr.length > 0)
        {
        this.products = JSON.parse(localStorage.getItem('products'));
        }
      }

    render() {
        return (

            <div>
                 <p>{this.state.alert}</p>
             <div className="row">
             <div className="col-sm-5"></div>
             <div className="col-sm-4"></div>
             <div className="col-sm-2 cart"><Link to="/cart/"><button className="btn btn-primary margin-button">
            View Cart</button></Link>
                </div>               

             </div>

            <div className="row top-row-margin">
            <div className="col-sm-4 image-pointer" onClick={this.handleiPhone8Show}>
            <Iphone8/>
                </div>
                <div className="col-sm-4 image-pointer" onClick={this.handleiPhoneXShow}>
            <Iphonex/>
                </div>
                <div className="col-sm-4 image-pointer" onClick={this.handleiPhoneXSShow}>
            <Iphonexs/>
                </div>
                </div>
                <div className="row">
                 <div className="col-sm-4 product-name" onClick={this.handleiPhone8Show}>$849</div>
                 <div className="col-sm-4 product-name" onClick={this.handleiPhoneXShow}>$1149</div>
                 <div className="col-sm-4 product-name" onClick={this.handleiPhoneXSShow}>$1449</div>                
                </div>
                <div className="row">
                 <div className="col-sm-4 product-name" onClick={this.handleiPhone8Show}>iPhone 8</div>
                 <div className="col-sm-4 product-name" onClick={this.handleiPhoneXShow}>iPhone X</div>
                 <div className="col-sm-4 product-name" onClick={this.handleiPhoneXSShow}>iPhone XS</div>                
                </div>
                <div className="row">
                 <div className="col-sm-4 product-name"><button className="btn btn-primary margin-button" onClick={this.addToCart} value={"iphone8"}>Add to Cart</button></div>
                 <div className="col-sm-4 product-name"><button className="btn btn-primary margin-button" onClick={this.addToCart} value={"iphoneX"}>Add to Cart</button></div>
                 <div className="col-sm-4 product-name"><button className="btn btn-primary margin-button" onClick={this.addToCart} value={"iphoneXS"}>Add to Cart</button></div>               
                </div>




            {/* Modal for iPhone 8 info */}
        <Modal show={this.state.iPhone8Show} onHide={this.handleiPhone8Close}>
          <Modal.Header closeButton>
            <Modal.Title>Apple iPhone 8</Modal.Title>
          </Modal.Header>
          <Modal.Body>
              <p><span>Announced:</span> <span className="modal-float-right">2017, September</span></p>
              <p><span>Display:</span> <span className="modal-float-right">4.7 inches, 60.9 cm2</span></p>
              <p><span>OS:</span> <span className="modal-float-right">iOS 11, Upgradable</span></p>
              <p><span>Memory:</span> <span className="modal-float-right">64/256 GB, 2GB RAM</span></p>
              <p><span>Battery:</span> <span className="modal-float-right">Li-Ion 1821mAh</span></p>
              <p><span>Price:</span> <span className="modal-float-right">$849</span></p>


          </Modal.Body>
          <Modal.Footer>
            <Button variant="primary" onClick={this.handleiPhone8Close} className="margin-button">
              Close
            </Button>
          </Modal.Footer>
        </Modal>

        {/* Modal for iPhone x */}
        <Modal show={this.state.iPhoneXShow} onHide={this.handleiPhoneXClose}>
          <Modal.Header closeButton>
            <Modal.Title>Apple iPhone X</Modal.Title>
          </Modal.Header>
          <Modal.Body>
              <p><span>Announced:</span> <span className="modal-float-right">2017, September</span></p>
              <p><span>Display:</span> <span className="modal-float-right">5.8 inches, 84.4 cm2</span></p>
              <p><span>OS:</span> <span className="modal-float-right">iOS 11.1.1, upgradable</span></p>
              <p><span>Memory:</span> <span className="modal-float-right">64/256 GB, 3 GB RAM</span></p>
              <p><span>Battery:</span> <span className="modal-float-right">Li-Ion 2716 mAh</span></p>
              <p><span>Price:</span> <span className="modal-float-right">$1149</span></p>


          </Modal.Body>
          <Modal.Footer>
            <Button variant="primary" onClick={this.handleiPhoneXClose} className="margin-button">
              Close
            </Button>
          </Modal.Footer>
        </Modal>

         {/* Modal for iPhone xs */}
         <Modal show={this.state.iPhoneXSShow} onHide={this.handleiPhoneXSClose}>
          <Modal.Header closeButton>
            <Modal.Title>Apple iPhone XS</Modal.Title>
          </Modal.Header>
          <Modal.Body>
              <p><span>Announced:</span> <span className="modal-float-right">2018, September</span></p>
              <p><span>Display:</span> <span className="modal-float-right">5.8 inches, 84.4 cm2</span></p>
              <p><span>OS:</span> <span className="modal-float-right">iOS 12, upgradable</span></p>
              <p><span>Memory:</span> <span className="modal-float-right">64/256/512 GB,4GBRAM</span></p>
              <p><span>Battery:</span> <span className="modal-float-right">Li-Ion 2658 mAh</span></p>
              <p><span>Price:</span> <span className="modal-float-right">$1449</span></p>


          </Modal.Body>
          <Modal.Footer>
            <Button variant="primary" onClick={this.handleiPhoneXSClose} className="margin-button">
              Close
            </Button>
          </Modal.Footer>
        </Modal>


                </div>
        )}
}

export default Home;
449</div>                
                </div>
                <div className="row">
                 <div className="col-sm-4 product-name" onClick={this.handleiPhone8Show}>iPhone 8</div>
                 <div className="col-sm-4 product-name" onClick={this.handleiPhoneXShow}>iPhone X</div>
                 <div className="col-sm-4 product-name" onClick={this.handleiPhoneXSShow}>iPhone XS</div>                
                </div>
                <div className="row">
                 <div className="col-sm-4 product-name"><button className="btn btn-primary margin-button" onClick={this.addToCart} value={"iphone8"}>Add to Cart</button></div>
                 <div className="col-sm-4 product-name"><button className="btn btn-primary margin-button" onClick={this.addToCart} value={"iphoneX"}>Add to Cart</button></div>
                 <div className="col-sm-4 product-name"><button className="btn btn-primary margin-button" onClick={this.addToCart} value={"iphoneXS"}>Add to Cart</button></div>               
                </div>




            {/* Modal for iPhone 8 info */}
        <Modal show={this.state.iPhone8Show} onHide={this.handleiPhone8Close}>
          <Modal.Header closeButton>
            <Modal.Title>Apple iPhone 8</Modal.Title>
          </Modal.Header>
          <Modal.Body>
              <p><span>Announced:</span> <span className="modal-float-right">2017, September</span></p>
              <p><span>Display:</span> <span className="modal-float-right">4.7 inches, 60.9 cm2</span></p>
              <p><span>OS:</span> <span className="modal-float-right">iOS 11, Upgradable</span></p>
              <p><span>Memory:</span> <span className="modal-float-right">64/256 GB, 2GB RAM</span></p>
              <p><span>Battery:</span> <span className="modal-float-right">Li-Ion 1821mAh</span></p>
              <p><span>Price:</span> <span className="modal-float-right">$849</span></p>


          </Modal.Body>
          <Modal.Footer>
            <Button variant="primary" onClick={this.handleiPhone8Close} className="margin-button">
              Close
            </Button>
          </Modal.Footer>
        </Modal>

        {/* Modal for iPhone x */}
        <Modal show={this.state.iPhoneXShow} onHide={this.handleiPhoneXClose}>
          <Modal.Header closeButton>
            <Modal.Title>Apple iPhone X</Modal.Title>
          </Modal.Header>
          <Modal.Body>
              <p><span>Announced:</span> <span className="modal-float-right">2017, September</span></p>
              <p><span>Display:</span> <span className="modal-float-right">5.8 inches, 84.4 cm2</span></p>
              <p><span>OS:</span> <span className="modal-float-right">iOS 11.1.1, upgradable</span></p>
              <p><span>Memory:</span> <span className="modal-float-right">64/256 GB, 3 GB RAM</span></p>
              <p><span>Battery:</span> <span className="modal-float-right">Li-Ion 2716 mAh</span></p>
              <p><span>Price:</span> <span className="modal-float-right">import React, { Component } from 'react';
import Iphone8 from "./iPhones/iphone8"
import Iphonex from "./iPhones/iphonex"
import Iphonexs from "./iPhones/iphonexs"
import "./layout.css";
import { Modal, Button } from 'react-bootstrap';
import { Link } from "gatsby";
import _ from "lodash";

class Home extends Component {
    products = [];
    constructor(props) {
        super(props);
        this.state = {
            iPhone8Show: false,
            iPhoneXShow: false,
            iPhoneXSShow: false,
            alert: "",
        };
        this.handleiPhone8Show = this.handleiPhone8Show.bind(this);
        this.handleiPhone8Close = this.handleiPhone8Close.bind(this);
        this.handleiPhoneXShow = this.handleiPhoneXShow.bind(this);
        this.handleiPhoneXClose = this.handleiPhoneXClose.bind(this);
        this.handleiPhoneXSShow = this.handleiPhoneXSShow.bind(this);
        this.handleiPhoneXSClose = this.handleiPhoneXSClose.bind(this);
    }

    handleiPhone8Close() {
        this.setState({ iPhone8Show: false });
      }

      handleiPhone8Show() {
        this.setState({ iPhone8Show: true });
      }
      handleiPhoneXClose() {
        this.setState({ iPhoneXShow: false });
      }

      handleiPhoneXShow() {
        this.setState({ iPhoneXShow: true });
      }
      handleiPhoneXSClose() {
        this.setState({ iPhoneXSShow: false });
      }

      handleiPhoneXSShow() {
        this.setState({ iPhoneXSShow: true });
      }

    //   Add products to cart
      addToCart = (e)=>
      {
        var product = e.target.value;
        this.setState({alert: "Product Added to Cart"});
        setTimeout(
            function() {
                this.setState({alert: ""});
            }
            .bind(this),
            3000
        );
            this.products.push(product);
            localStorage.setItem('products', JSON.stringify(this.products))
      }

      componentDidMount()
      {
        var arr = _.values(JSON.parse(localStorage.getItem('products')));
        if(arr.length > 0)
        {
        this.products = JSON.parse(localStorage.getItem('products'));
        }
      }

    render() {
        return (

            <div>
                 <p>{this.state.alert}</p>
             <div className="row">
             <div className="col-sm-5"></div>
             <div className="col-sm-4"></div>
             <div className="col-sm-2 cart"><Link to="/cart/"><button className="btn btn-primary margin-button">
            View Cart</button></Link>
                </div>               

             </div>

            <div className="row top-row-margin">
            <div className="col-sm-4 image-pointer" onClick={this.handleiPhone8Show}>
            <Iphone8/>
                </div>
                <div className="col-sm-4 image-pointer" onClick={this.handleiPhoneXShow}>
            <Iphonex/>
                </div>
                <div className="col-sm-4 image-pointer" onClick={this.handleiPhoneXSShow}>
            <Iphonexs/>
                </div>
                </div>
                <div className="row">
                 <div className="col-sm-4 product-name" onClick={this.handleiPhone8Show}>$849</div>
                 <div className="col-sm-4 product-name" onClick={this.handleiPhoneXShow}>$1149</div>
                 <div className="col-sm-4 product-name" onClick={this.handleiPhoneXSShow}>$1449</div>                
                </div>
                <div className="row">
                 <div className="col-sm-4 product-name" onClick={this.handleiPhone8Show}>iPhone 8</div>
                 <div className="col-sm-4 product-name" onClick={this.handleiPhoneXShow}>iPhone X</div>
                 <div className="col-sm-4 product-name" onClick={this.handleiPhoneXSShow}>iPhone XS</div>                
                </div>
                <div className="row">
                 <div className="col-sm-4 product-name"><button className="btn btn-primary margin-button" onClick={this.addToCart} value={"iphone8"}>Add to Cart</button></div>
                 <div className="col-sm-4 product-name"><button className="btn btn-primary margin-button" onClick={this.addToCart} value={"iphoneX"}>Add to Cart</button></div>
                 <div className="col-sm-4 product-name"><button className="btn btn-primary margin-button" onClick={this.addToCart} value={"iphoneXS"}>Add to Cart</button></div>               
                </div>




            {/* Modal for iPhone 8 info */}
        <Modal show={this.state.iPhone8Show} onHide={this.handleiPhone8Close}>
          <Modal.Header closeButton>
            <Modal.Title>Apple iPhone 8</Modal.Title>
          </Modal.Header>
          <Modal.Body>
              <p><span>Announced:</span> <span className="modal-float-right">2017, September</span></p>
              <p><span>Display:</span> <span className="modal-float-right">4.7 inches, 60.9 cm2</span></p>
              <p><span>OS:</span> <span className="modal-float-right">iOS 11, Upgradable</span></p>
              <p><span>Memory:</span> <span className="modal-float-right">64/256 GB, 2GB RAM</span></p>
              <p><span>Battery:</span> <span className="modal-float-right">Li-Ion 1821mAh</span></p>
              <p><span>Price:</span> <span className="modal-float-right">$849</span></p>


          </Modal.Body>
          <Modal.Footer>
            <Button variant="primary" onClick={this.handleiPhone8Close} className="margin-button">
              Close
            </Button>
          </Modal.Footer>
        </Modal>

        {/* Modal for iPhone x */}
        <Modal show={this.state.iPhoneXShow} onHide={this.handleiPhoneXClose}>
          <Modal.Header closeButton>
            <Modal.Title>Apple iPhone X</Modal.Title>
          </Modal.Header>
          <Modal.Body>
              <p><span>Announced:</span> <span className="modal-float-right">2017, September</span></p>
              <p><span>Display:</span> <span className="modal-float-right">5.8 inches, 84.4 cm2</span></p>
              <p><span>OS:</span> <span className="modal-float-right">iOS 11.1.1, upgradable</span></p>
              <p><span>Memory:</span> <span className="modal-float-right">64/256 GB, 3 GB RAM</span></p>
              <p><span>Battery:</span> <span className="modal-float-right">Li-Ion 2716 mAh</span></p>
              <p><span>Price:</span> <span className="modal-float-right">$1149</span></p>


          </Modal.Body>
          <Modal.Footer>
            <Button variant="primary" onClick={this.handleiPhoneXClose} className="margin-button">
              Close
            </Button>
          </Modal.Footer>
        </Modal>

         {/* Modal for iPhone xs */}
         <Modal show={this.state.iPhoneXSShow} onHide={this.handleiPhoneXSClose}>
          <Modal.Header closeButton>
            <Modal.Title>Apple iPhone XS</Modal.Title>
          </Modal.Header>
          <Modal.Body>
              <p><span>Announced:</span> <span className="modal-float-right">2018, September</span></p>
              <p><span>Display:</span> <span className="modal-float-right">5.8 inches, 84.4 cm2</span></p>
              <p><span>OS:</span> <span className="modal-float-right">iOS 12, upgradable</span></p>
              <p><span>Memory:</span> <span className="modal-float-right">64/256/512 GB,4GBRAM</span></p>
              <p><span>Battery:</span> <span className="modal-float-right">Li-Ion 2658 mAh</span></p>
              <p><span>Price:</span> <span className="modal-float-right">$1449</span></p>


          </Modal.Body>
          <Modal.Footer>
            <Button variant="primary" onClick={this.handleiPhoneXSClose} className="margin-button">
              Close
            </Button>
          </Modal.Footer>
        </Modal>


                </div>
        )}
}

export default Home;
149</span></p>


          </Modal.Body>
          <Modal.Footer>
            <Button variant="primary" onClick={this.handleiPhoneXClose} className="margin-button">
              Close
            </Button>
          </Modal.Footer>
        </Modal>

         {/* Modal for iPhone xs */}
         <Modal show={this.state.iPhoneXSShow} onHide={this.handleiPhoneXSClose}>
          <Modal.Header closeButton>
            <Modal.Title>Apple iPhone XS</Modal.Title>
          </Modal.Header>
          <Modal.Body>
              <p><span>Announced:</span> <span className="modal-float-right">2018, September</span></p>
              <p><span>Display:</span> <span className="modal-float-right">5.8 inches, 84.4 cm2</span></p>
              <p><span>OS:</span> <span className="modal-float-right">iOS 12, upgradable</span></p>
              <p><span>Memory:</span> <span className="modal-float-right">64/256/512 GB,4GBRAM</span></p>
              <p><span>Battery:</span> <span className="modal-float-right">Li-Ion 2658 mAh</span></p>
              <p><span>Price:</span> <span className="modal-float-right">import React, { Component } from 'react';
import Iphone8 from "./iPhones/iphone8"
import Iphonex from "./iPhones/iphonex"
import Iphonexs from "./iPhones/iphonexs"
import "./layout.css";
import { Modal, Button } from 'react-bootstrap';
import { Link } from "gatsby";
import _ from "lodash";

class Home extends Component {
    products = [];
    constructor(props) {
        super(props);
        this.state = {
            iPhone8Show: false,
            iPhoneXShow: false,
            iPhoneXSShow: false,
            alert: "",
        };
        this.handleiPhone8Show = this.handleiPhone8Show.bind(this);
        this.handleiPhone8Close = this.handleiPhone8Close.bind(this);
        this.handleiPhoneXShow = this.handleiPhoneXShow.bind(this);
        this.handleiPhoneXClose = this.handleiPhoneXClose.bind(this);
        this.handleiPhoneXSShow = this.handleiPhoneXSShow.bind(this);
        this.handleiPhoneXSClose = this.handleiPhoneXSClose.bind(this);
    }

    handleiPhone8Close() {
        this.setState({ iPhone8Show: false });
      }

      handleiPhone8Show() {
        this.setState({ iPhone8Show: true });
      }
      handleiPhoneXClose() {
        this.setState({ iPhoneXShow: false });
      }

      handleiPhoneXShow() {
        this.setState({ iPhoneXShow: true });
      }
      handleiPhoneXSClose() {
        this.setState({ iPhoneXSShow: false });
      }

      handleiPhoneXSShow() {
        this.setState({ iPhoneXSShow: true });
      }

    //   Add products to cart
      addToCart = (e)=>
      {
        var product = e.target.value;
        this.setState({alert: "Product Added to Cart"});
        setTimeout(
            function() {
                this.setState({alert: ""});
            }
            .bind(this),
            3000
        );
            this.products.push(product);
            localStorage.setItem('products', JSON.stringify(this.products))
      }

      componentDidMount()
      {
        var arr = _.values(JSON.parse(localStorage.getItem('products')));
        if(arr.length > 0)
        {
        this.products = JSON.parse(localStorage.getItem('products'));
        }
      }

    render() {
        return (

            <div>
                 <p>{this.state.alert}</p>
             <div className="row">
             <div className="col-sm-5"></div>
             <div className="col-sm-4"></div>
             <div className="col-sm-2 cart"><Link to="/cart/"><button className="btn btn-primary margin-button">
            View Cart</button></Link>
                </div>               

             </div>

            <div className="row top-row-margin">
            <div className="col-sm-4 image-pointer" onClick={this.handleiPhone8Show}>
            <Iphone8/>
                </div>
                <div className="col-sm-4 image-pointer" onClick={this.handleiPhoneXShow}>
            <Iphonex/>
                </div>
                <div className="col-sm-4 image-pointer" onClick={this.handleiPhoneXSShow}>
            <Iphonexs/>
                </div>
                </div>
                <div className="row">
                 <div className="col-sm-4 product-name" onClick={this.handleiPhone8Show}>$849</div>
                 <div className="col-sm-4 product-name" onClick={this.handleiPhoneXShow}>$1149</div>
                 <div className="col-sm-4 product-name" onClick={this.handleiPhoneXSShow}>$1449</div>                
                </div>
                <div className="row">
                 <div className="col-sm-4 product-name" onClick={this.handleiPhone8Show}>iPhone 8</div>
                 <div className="col-sm-4 product-name" onClick={this.handleiPhoneXShow}>iPhone X</div>
                 <div className="col-sm-4 product-name" onClick={this.handleiPhoneXSShow}>iPhone XS</div>                
                </div>
                <div className="row">
                 <div className="col-sm-4 product-name"><button className="btn btn-primary margin-button" onClick={this.addToCart} value={"iphone8"}>Add to Cart</button></div>
                 <div className="col-sm-4 product-name"><button className="btn btn-primary margin-button" onClick={this.addToCart} value={"iphoneX"}>Add to Cart</button></div>
                 <div className="col-sm-4 product-name"><button className="btn btn-primary margin-button" onClick={this.addToCart} value={"iphoneXS"}>Add to Cart</button></div>               
                </div>




            {/* Modal for iPhone 8 info */}
        <Modal show={this.state.iPhone8Show} onHide={this.handleiPhone8Close}>
          <Modal.Header closeButton>
            <Modal.Title>Apple iPhone 8</Modal.Title>
          </Modal.Header>
          <Modal.Body>
              <p><span>Announced:</span> <span className="modal-float-right">2017, September</span></p>
              <p><span>Display:</span> <span className="modal-float-right">4.7 inches, 60.9 cm2</span></p>
              <p><span>OS:</span> <span className="modal-float-right">iOS 11, Upgradable</span></p>
              <p><span>Memory:</span> <span className="modal-float-right">64/256 GB, 2GB RAM</span></p>
              <p><span>Battery:</span> <span className="modal-float-right">Li-Ion 1821mAh</span></p>
              <p><span>Price:</span> <span className="modal-float-right">$849</span></p>


          </Modal.Body>
          <Modal.Footer>
            <Button variant="primary" onClick={this.handleiPhone8Close} className="margin-button">
              Close
            </Button>
          </Modal.Footer>
        </Modal>

        {/* Modal for iPhone x */}
        <Modal show={this.state.iPhoneXShow} onHide={this.handleiPhoneXClose}>
          <Modal.Header closeButton>
            <Modal.Title>Apple iPhone X</Modal.Title>
          </Modal.Header>
          <Modal.Body>
              <p><span>Announced:</span> <span className="modal-float-right">2017, September</span></p>
              <p><span>Display:</span> <span className="modal-float-right">5.8 inches, 84.4 cm2</span></p>
              <p><span>OS:</span> <span className="modal-float-right">iOS 11.1.1, upgradable</span></p>
              <p><span>Memory:</span> <span className="modal-float-right">64/256 GB, 3 GB RAM</span></p>
              <p><span>Battery:</span> <span className="modal-float-right">Li-Ion 2716 mAh</span></p>
              <p><span>Price:</span> <span className="modal-float-right">$1149</span></p>


          </Modal.Body>
          <Modal.Footer>
            <Button variant="primary" onClick={this.handleiPhoneXClose} className="margin-button">
              Close
            </Button>
          </Modal.Footer>
        </Modal>

         {/* Modal for iPhone xs */}
         <Modal show={this.state.iPhoneXSShow} onHide={this.handleiPhoneXSClose}>
          <Modal.Header closeButton>
            <Modal.Title>Apple iPhone XS</Modal.Title>
          </Modal.Header>
          <Modal.Body>
              <p><span>Announced:</span> <span className="modal-float-right">2018, September</span></p>
              <p><span>Display:</span> <span className="modal-float-right">5.8 inches, 84.4 cm2</span></p>
              <p><span>OS:</span> <span className="modal-float-right">iOS 12, upgradable</span></p>
              <p><span>Memory:</span> <span className="modal-float-right">64/256/512 GB,4GBRAM</span></p>
              <p><span>Battery:</span> <span className="modal-float-right">Li-Ion 2658 mAh</span></p>
              <p><span>Price:</span> <span className="modal-float-right">$1449</span></p>


          </Modal.Body>
          <Modal.Footer>
            <Button variant="primary" onClick={this.handleiPhoneXSClose} className="margin-button">
              Close
            </Button>
          </Modal.Footer>
        </Modal>


                </div>
        )}
}

export default Home;
449</span></p>


          </Modal.Body>
          <Modal.Footer>
            <Button variant="primary" onClick={this.handleiPhoneXSClose} className="margin-button">
              Close
            </Button>
          </Modal.Footer>
        </Modal>


                </div>
        )}
}

export default Home;

This component is stateful, not a stateless component as most of the Gatsby components usually are.

In this component, we have shown three products which all are iPhones. Main this is that images of these iPhones are kept in a folder and called through a different component. At line number 91, 94, and 97 you can check how these are imported to home.

Here we used the bootstrap modal to show the specifications of the products. Let us explain the working of the main methods.

addToCart(): This is an event-driven method and pushes the product to an array when the user clicks on the add to cart.

handleiPhone8Close() and handleiPhone8Show(): These are the handlers for bootstrap modals which are used to show the specifications of products.

iPhones Component

The iPhone folder has three components named iphone8.js, iphonex.js, and iphonexs.js. These components only used to add images to other components. We used these components in home page. Actually, these components usefor this purpose which makes the images loading very fast on websites. Check the code of one image component: components/iPhones/iphone8.js

import React from "react"
import { StaticQuery, graphql } from "gatsby"
import Img from "gatsby-image"

const Iphone8 = () => (
  <StaticQuery
    query={graphql`
      query {
        placeholderImage: file(relativePath: { eq: "apple-iphone-8-plus-0.jpg" }) {
          childImageSharp {
            fluid(maxWidth: 300) {
              ...GatsbyImageSharpFluid
            }
          }
        }
      }
    `}
    render={data => <Img fluid={data.placeholderImage.childImageSharp.fluid} />}
  />

)
    export default Iphone8

Cart Component

When the user added products to the cart and click the Show Cart button, then flow of the app goes to another page cart.js. Let’s check the code of this page: src/pages/cart.js

import React, { Component } from 'react';
import { Link } from "gatsby"
import _ from "lodash";
import { Modal } from 'react-bootstrap';
import cosmicService from './../services/cosmicService';

const Iphone8 = (props) => {
    return <div>
        <img src={require('../images/apple-iphone-8-plus-0.jpg')} className="cart-image" alt="iphone8"/>
        <h6 className="cart-pro-text">iPhone 8</h6>
    </div>
}

const IphoneX = (props) => {
    return <div>
        <img src={require('../images/apple-iphone-x-new-1.jpg')} className="cart-image" alt="iphonex" />
        <h6 className="cart-pro-text">iPhone X</h6>

    </div>
}

const IphoneXS = (props) => {
    return <div>
        <img src={require('../images/iphone-xs-img.jpg')} className="cart-image" alt="iphonexs" />
        <h6 className="cart-pro-text">iPhone XS</h6>
    </div>
}

class Cart extends Component {
    productArray = [];
    constructor(props) {
        super(props);
        this.state = {
            isEmpty: "false",
            message: 'My Cart is:',
            iphone8: false,
            iphoneX: false,
            iphoneXS: false,
            nav: true,
            checkoutShow: false,
            userName: '',
            address: '',
            cardNumber: '',
            cvv: '',
            cardExpiryDate: '',
            mobile: '',
            amount:'',
            isLoading: '',
            dynamic: '',
        };
        this.handleCheckoutShow = this.handleCheckoutShow.bind(this);
        this.handleCheckoutClose = this.handleCheckoutClose.bind(this);
        this.emptyCart = this.emptyCart.bind(this);
    }

    // getting products which are in cart
    getProducts() {
        this.productArray = _.values(JSON.parse(localStorage.getItem('products')));
        if (this.productArray.length < 1) {
            this.setState({ isEmpty: "true" });
            this.setState({ dynamic: 'dynamic' });
            this.setState({ message: "Your Cart is Empty" });
            this.setState({ nav: false });
        }
    }

    componentDidMount() {
        this.getProducts();
        this.checkingCart();

    }

    //checking products in Cart
    checkingCart() {
        var amount = 0;
        if (this.productArray.indexOf('iphone8') >= 0) {
            this.setState({ iphone8: true })
            amount = amount + 849;
        }

        if (this.productArray.indexOf('iphoneX') >= 0) {
            this.setState({ iphoneX: true });
            amount = amount + 1149;
        }

        if (this.productArray.indexOf('iphoneXS') >= 0) {
            this.setState({ iphoneXS: true })
            amount = amount + 1449;
        }
        this.setState({amount: amount})
    }

    handleCheckoutShow() {
        this.setState({ checkoutShow: true });
    }

    handleCheckoutClose() {
        this.setState({ checkoutShow: false });
    }

    onChange = (e) => {
        const state = this.state
        state[e.target.name] = e.target.value;
        this.setState(state);
    }

    emptyCart()
    {
        localStorage.removeItem('products');

    }

    onSubmit = (e) =>
    {
        this.setState({isLoading: 'Placing order...'})
      e.preventDefault();
        cosmicService.placeOrder(this.state.userName, this.state.address, this.state.cardNumber, this.state.cvv, this.state.cardExpiryDate, this.state.mobile, this.state.amount)
        .then((result)=>{
            this.setState({isLoading: 'Order successfully placed!'});
            setTimeout(() => {
                this.setState({checkoutShow: false});
                localStorage.removeItem('products');
              }, 3000);
        })
    }

    render() {
        return (
            <div>
                <div className="jumbotron"><b>Gatsby Ecommerce App in Cosmic JS</b></div>
                <div><Link to="/"><button className="btn btn-primary margin-button ">
                    Back</button></Link></div>
                <div className="container h-100 d-flex justify-content-center">

                    <div className="row">
                        <div>
                            <h1>{this.state.message}</h1>
                            <div className="">
                            {this.state.iphone8 ? <Iphone8 /> : null}
                            {this.state.iphoneX ? <IphoneX /> : null}
                            {this.state.iphoneXS ? <IphoneXS /> : null}
                            </div>
                            <div className="button-padding">
                            <div className={this.state.dynamic}><Link to="/"><button className="btn btn-danger" onClick={this.emptyCart}>
                                Empty Cart</button></Link>

                                <button className="btn btn-primary margin-button" onClick={this.handleCheckoutShow}>
                                    Checkout</button></div>
                                    </div>

                        </div>

                    </div>
                </div>
                <Modal show={this.state.checkoutShow} onHide={this.handleCheckoutClose}>
                    <Modal.Header closeButton>
                        <Modal.Title>Checkout</Modal.Title>
                    </Modal.Header>
                    <Modal.Body>
                        <form onSubmit={this.onSubmit}>

                            <p><input type="text" name="userName" value={this.state.userName} onChange={this.onChange} placeholder="Enter your name" className="form-control"/></p>
                            <p><input type="text" name="address" value={this.state.address} onChange={this.onChange} placeholder="Enter your address" className="form-control" /></p>
                            <p><input type="text" name="cardNumber" value={this.state.cardNumber} onChange={this.onChange} placeholder="Enter your card number"  className="form-control"/></p>
                            <p><input type="text" name="cvv" value={this.state.cvv} onChange={this.onChange} placeholder="Enter your cvv" className="form-control" /></p>
                            <p><input type="text" name="cardExpiryDate" value={this.state.cardExpiryDate} onChange={this.onChange} placeholder="Enter card's expiry date" className="form-control" /></p>
                            <p><input type="text" name="mobile" value={this.state.mobile} onChange={this.onChange} placeholder="Enter your mobile"  className="form-control"/></p>
                            <p><span>Total Amount:</span><span>${this.state.amount}</span></p>

                            <p><input type="submit" value="Place Order" className="margin-button btn btn-primary"/></p>   
                            <p>{this.state.isLoading}</p>                        

                        </form>
                    </Modal.Body>                    
                </Modal>
            </div>
        )
    }

}
export default Cart;

Let us explain each method of cart.js:

getProducts(): In this method, we are getting the products which are stored in the cart. For cart, we temporary stores the products in local storage. That means this method is getting the products from local storage.

checkingCart(): This method is checking that which product is added to the cart that means this method is filtering the products and calculating the price.

onSubmit(): This is an event-driven method, which collecting the details of the order along with user billing details and passing to the method placeOrder() in the cosmicService.

Cosmic Service

This is the only service in this app which hits the Cosmic JS API and stores the data to Cosmic JS database. Check the code: src/services/cosmicService.js

import config from './../config/config';
import axios from 'axios';

const cosmicService = {

    placeOrder(userName, address, cardNumber, cvv, cardExpiryDate, mobile, amount)
    {
        return axios.post(config.url+config.bucket_slug+"/add-object/", {
            title: userName, slug: userName + cardNumber, type_slug: 'orders', write_key: config.write_key,
            metafields: [
                {
                  key: "userName",
                  type: "text",
                  value: userName
                },
                {
                    key: "address",
                    type: "text",
                    value: address
                  },
                  {
                    key: "cardNumber",
                    type: "text",
                    value: cardNumber
                  },
                  {
                    key: "cvv",
                    type: "text",
                    value: cvv
                  },
                  {
                    key: "cardExpiryDate",
                    type: "text",
                    value: cardExpiryDate
                  },
                  {
                    key: "mobile",
                    type: "text",
                    value: mobile
                  },
                  {
                    key: "totalamount",
                    type: "text",
                    value: amount
                  }
            ]
        })
    }
}

export default cosmicService;

There is only one method in this service named placeOrder() which accepts the seven arguments. It hits the post request to the Cosmic JS server to save the data. Here we are providing write access key for taking the permission of writing on the Cosmic JS database. This is an example of storing information in Cosmic JS; however, it’s never advised to store credit card data in Cosmic JS.

What Functionality We Have Implemented?

Till now we have implemented the complete functionality on the development server. That means we can use the complete functionality of the app in development mode. Because it is a Gatsby app created with npm CLI, so it is deployable on any server which allows deployment from node.js app. Here we deployed our app on Heroku server.

We created this app with Gatsby CLI and used React.js also to make some components stateful. After using this app, you will understand the power of Cosmic JS because of its blazing speed.

Conclusion

With the help of Cosmic JS we can create powerful apps and can use the Cosmic JS database for fast data processing. Here we created and configured a Gatsby.js app with Cosmic JS without any difficulty. You don’t need to install any extra efforts to configure and use Cosmic JS APIs.

javascript web-development

What's new in Bootstrap 5 and when Bootstrap 5 release date?

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

Random Password Generator Online

HTML Color Picker online | HEX Color Picker | RGB Color Picker

Hire Dedicated eCommerce Web Developers | Top eCommerce Web Designers

Build your eCommerce project by hiring our expert eCommerce Website developers. Our Dedicated Web Designers develop powerful & robust website in a short span of time.

Best Web and App Development Company in Ahmedabad

Contact DataPierce for any questions or queries you have about website development, designing, marketing projects or any small or enterprise software development.

Mobile App Development Company India | Ecommerce Web Development Company India

Best Mobile App Development Company India, WebClues Global is one of the leading web and mobile app development company. Our team offers complete IT solutions including Cross-Platform App Development, CMS & E-Commerce, and UI/UX Design.

For World Class Web Development Services in India visit RB Genie

Do you want excellent and world class web development services for your valuable projects? Contact **RB Genie **now, we have more than 8 years experienced team of web developers, which specializes in overall web design and website development...

JavaScript developers should you be using Web Workers?

Do you think JavaScript developers should be making more use of Web Workers to shift execution off of the main thread?