Giter Site home page Giter Site logo

products-list-react's Introduction

Products list react app

This app lists products in their corresponding categories using the Gousto APIs. The app uses the create-react-app node module.

Set up

Prerequisites

Installation

To download all required dependencies run npm install.

Available Scripts

In the project directory, you can run:

npm start

Runs the app in the development mode. Open http://localhost:3000 to view it in the browser.

npm test

Launches the test runner in the interactive watch mode. You may need to press a after this to run all tests. There will be 2 error messages logged to the console when the tests to fail the api calls are run.

npm test -- --coverage

Calculates code coverage for all test suites.

Folder Structure

The majority of code is in the src/ folder, with App and index files in the root of src/ and all components and related files in components/.

gousto-tech-test/
  README.md
  node_modules/
  package.json
  public/
    index.html
    favicon.ico
    manifest.json
  src/
    App.css
    App.js
    App.test.js
    index.css
    index.js
    components/
      categories/
      categoryItem/
      productItem/
      products/
        Products.css
        Products.js
        Products.test.js
      search/

Components

App.js is the main wrapper component that renders the Categories, Search and Products components. The Categories component is a list that renders individual CategoryItem components. Similarly the Products component is a list that renders ProductItem components, while the Search component just renders the search input box.

App/
  Categories/
    CategoryItem
  Search/
  Products/
    ProductItem

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.