Giter VIP home page Giter VIP logo

react_goods-selector's Introduction

React Goods selector

Task

  1. You are given an array of goods
  2. Display them as a list inside the App (DON'T create additional components)
  3. Add h1 initially saying No goods selected
  4. Save a selectedGood in the App. Let it be Jam by default
  5. The h1 should always show the name of the selected good Jam is selected
  6. The selected good should be hightlighted in the list (add CSS class with a background)
  7. Add a button Select next to each good in the list
  8. When you press the button the good becomes selected
  9. Don't show the button next to the selected good
  10. You can select another good by pressing its Select button
  11. Add button X for to the h1 to clear the selection. (Set null)
  12. The clear button should not be visible if there is no selected good

(* Optional) Advanced task

  1. Implement the ability to select multiple goods (use selectedGoods Array)
  2. Use functional setState described in this video
  3. Show Add or Remove instead of Select button
  4. All the selected goods should be listed in the h1:
    • No goods selected
    • Jam is selected
    • Carrot, Jam and Eggs are selected

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.