Code Monkey home page Code Monkey logo

shopping-cart's Introduction

Shopping Cart App

Setup

  1. Install Node.js if you haven't already
  2. Install yarn
  3. Install the create-react-app package globally: yarn global add create-react-app
  4. Clone this repository
  5. cd into the downloaded directory
  6. Run yarn install from the command line to install all dependencies

Running the app

While in the app directory, run yarn start to start the live server. The command line will display the address you need to visit. The live server will watch for changes to files in the src directory and reload the page when they're changed.

Viewing Static Version of the App

While developing the app, you can take a look at the static pages that you'll eventually convert into a dynamic application. To do so, visit /ui in the browser. You are also encouraged to read and reuse the markup, classes and ids used in these static files in your components. They're located in the /public/ui folder.

Developing the app

The starting point of the application is the /src/index.js file. That's where the root component of the application - Shop - is rendered to the DOM. You can add new components to the /src/components folder and new test files to the src/tests folder.

For the initial application data, you can start with the following list of products:

[
  {
    id: 1,
    title: 'Amazon Kindle E-reader',
    quantity: 5,
    price: 79.99
  },
  {
    id: 2,
    title: 'Apple 10.5-Inch iPad Pro',
    quantity: 3,
    price: 649.99
  },
  {
    id: 3,
    title: 'Yamaha Portable Keyboard',
    quantity: 2,
    price: 155.99
  },
  {
    id: 4,
    title: 'Tinker, Tailor, Soldier, Spy - A John le Carre Novel',
    quantity: 12,
    price: 13.74
  }
]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.