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