yatania / react_dynamic-list-of-goods

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

React dynamic list of goods

Task

Load the goods and show them on the page

  1. Render 3 buttons loading the goods from server and saving them in the state:
    • Load All goods shows all the received goods
    • Load 5 first goods shows 5 first goods after sorting them by name
    • Load red goods containing only red goods
  2. Server has only 1 endpoint returning all the goods, so you should prepare them after receiving.
  3. Create a component GoodsList accepting an array of goods and rendering them inside a <ul>
  4. Print a name of each good using good.color(for example style={{ color: 'red' }})
  5. There should be a new request to the server on each button click.
  6. GoodsList should show the last loaded goods.

About


Languages

Language:JavaScript 75.5%Language:HTML 22.9%Language:CSS 1.6%