- Replace
<your_account>
with your Github username in the DEMO LINK - Follow the React task guideline
- Use React TypeScript cheat sheet
Load the goods and show them on the page
- Render 3 buttons loading the goods from server and saving them in the state:
Load All goods
shows all the receivedgoods
Load 5 first goods
shows 5 firstgoods
after sorting them by nameLoad red goods
containing onlyred
goods
- Server has only 1 endpoint returning all the goods, so you should prepare them after receiving.
- Create a component
GoodsList
accepting an array of goods and rendering them inside a<ul>
- Print a
name
of eachgood
usinggood.color
(for examplestyle={{ color: 'red' }}
) - There should be a new request to the server on each button click.
GoodsList
should show the last loaded goods.