Giter VIP home page Giter VIP logo

gousto's Introduction

Gousto Categories and Products

This simple React project consumes Gousto API and display a set of categories and corresponding products.

Instalation

Project is using webpack as a resource bundler.

Clone this repo and then run:

npm install
npm start
open index.html in browser

How to use

Clicking on any category will bring a list of products for this category and made a selected category bold.

When clicked on product, it will become bold and show it's description. That can be toggle ON and OFF.

Input box is the filter for a given product list. It is case insensitive and it will filter currently shown products in selected category. If we switch to another category, the same filter will still apply.

Styling

Basic styling is done wih Bootstrap library.

Testing

In order to run the tests run this command:

npm install
npm test

Components

For a small project I use React and some local state. For more complex I would consider using Redux as a state manager.

  • Main Component

    • Is a point of entry for webpack
    • Is calling APIs to get data
    • Renders CategoryList and ProductList
  • CategoryList

    • Renders a list of Categories
  • Category

    • Display on Category
    • When selected, makes a category bold (strong)
  • ProductList

    • Renders a list of products of selected category
    • Holds a filter text in state
  • Product

    • Display single product
    • Shows description when selected
    • Use a local toggle state
  • SearchInput

    • Renders input box for filtering products

gousto's People

Watchers

Piotr Lipski 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.