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
selectedGoodin the state (Jamis the default value). - Show the name of the selected good in the
h1.title(Jam is selected). - Add the
has-background-success-lightclass to thetrof the selected Good. - Show the
ClearButtonbutton in the title only when a good is selected. ClearButtonshould 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
AddButtonto select the good.- only 1 good can be selected at a time;
- Don't show
AddButtonwhen a good is selected. - Show
RemoveButtonfor 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 testto ensure your solution is correct. - Replace
<your_account>with your Github username in the DEMO LINK and add it to the PR description.