Giter Site home page Giter Site logo

basket's Introduction

Shopping Basket README

This code test solution was written in React/JavaScript and built with Webpack. Styling was done with Semantic UI React and CSS.

Before running the program

Clone the repository onto your local machine. Then, run npm install in the command line to install all dependencies.

Running the program

To run the program, execute npm start in the command line. It will start the local server and open up the app in a browser window.

Architecture

This app is made up of five components. They are located in the src/components folder.

App.js The main parent component.

Container.js The container for all other components. Keeps track of items added and renders child components inside a grid. Holds functions for adding/removing items and removing all items.

Item.js This component represents a grocery item and is contained within the 'basket'. It has state to keep track of its amount, as well as functions to increase or decrease its amount.

ItemForm.js Form for adding an item to the basket. Allows a user to enter information about the type of item they want to add. When submitted, the item is added to the state in Container.js and rendered by ItemList.js.

ItemList.js Stateless functional component that renders Item components to a list.

Directory structure

src Contains components, index.html, index.js, and stylesheet.

src/components Contains React components.

root package.json, webpack.config.js, README.md, and Node modules folder are contained at the root level.

basket's People

Contributors

cbuggelli avatar

Watchers

 avatar

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.