- Replace
<your_account>
with your Github username in the DEMO LINK - Follow the React task guideline
- Use React TypeScript cheat sheet
- You are given an array of goods
- Display them as a list inside the
App
(DON'T create additional components) - Add
h1
initially sayingNo goods selected
- Save a
selectedGood
in theApp
. Let it beJam
by default - The
h1
should always show the name of the selected goodJam is selected
- The selected good should be highlighted in the list (add CSS class with a background)
- Add a button
Select
next to each good in the list - When you press the button the good becomes selected
- Don't show the button next to the selected good
- You can select another good by pressing its
Select
button - Add button
X
for to theh1
to clear the selection. (Setnull
) - The clear button should not be visible if there is no selected good
- Implement the ability to select multiple goods (use
selectedGoods
Array) - Use functional
setState
described in this video - Show
Add
orRemove
instead ofSelect
button - All the selected goods should be listed in the
h1
:No goods selected
Jam is selected
Carrot, Jam and Eggs are selected