Changing clothes

Here are 8 items of clothing:

  • Apron
  • Belt
  • Cardigan
  • Dress
  • Earrings
  • Fur coat
  • Gloves
  • Hat

Make an app that would allow to edit the names of the items:

  1. There is an "Edit" button next to each item.
  2. When the user clicks the button, the item transforms to an input field with the current name of the item as its initial value. If the user changes it and hits Enter, the input field hides and the item reappears, now with its new name.
  3. The user can then repeat the action.
  4. If the user leaves the field empty and presses Enter, remove the item from the list.

Create your project as a simple HTML page that uses Redux (link to redux.min.js).

First decide what will be stored in your state, what types of actions you will use and what exact data the actions will include, if any. Then implement a reducer. After all that is done you can move on to writing the rest of the code.