GithubHelp home page GithubHelp logo

react_goods-selector's Introduction

React Goods Selector

React + Typescript cheat sheet

You are given an array of goods. Render them in a table with the ability to select one or clear selection.

Here is the working version

  1. Write everything inside the App (don't create additional components).
  2. Save a selectedGood in the state (Jam is the default value).
  3. Show the name of the selected good in the h1.title (Jam is selected).
  4. Add the has-background-success-light class to the tr of the selected Good.
  5. Show the ClearButton button in the title only when a good is selected.
  6. ClearButton should clear selection by setting an empty string to selectedGood.
  7. When there is no selected good, the title should show No goods selected.
  8. Each good should have an AddButton to select the good.
    • only 1 good can be selected at a time;
  9. Don't show AddButton when a good is selected.
  10. Show RemoveButton for the selected good to clear selection.

Instructions

  • Install Prettier Extention and use this VSCode settings to enable format on save.
  • Implement a solution following the React task guideline.
  • Use the React TypeScript cheat sheet.
  • Open one more terminal and run tests with npm test to ensure your solution is correct.
  • Replace <your_account> with your Github username in the DEMO LINK and add it to the PR description.

react_goods-selector's People

Contributors

alenatovstukha avatar bohdan-maksymiuk avatar danheim avatar ibrianwarner avatar maksimuscrs avatar mgrinko avatar mykhalenych avatar solaryasha avatar vpolets avatar yuriiholiuk avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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.