Code Monkey home page Code Monkey logo

react_goods-selector's Introduction

React Goods selector

  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. It should 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 highlighted 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 Select button the good becomes selected
  9. Don't show the Select button next to the selected good
  10. When the good is selected, the Select button should be displayed as Remove
  11. When you press the Remove button the good becomes unselected
  12. You can select another good by pressing its Select button
  13. Add button Clear to the h1 to clear the selection. (Set empty string '')
  14. 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 the next lesson Functional setState
  3. All the selected goods should be listed in the h1:
    • No goods selected
    • Jam is selected
    • Carrot, Jam and Eggs are selected
  4. Add some styles, you are frontend developer :) (use Bulma or another library)

Instructions

react_goods-selector's People

Contributors

danheim avatar ibrianwarner avatar maksimuscrs avatar mgrinko avatar vpolets avatar yuriiholiuk 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.