React Refactor

Task: Follow the three principles covered in today's session to refactor this app:

  1. Components should have one job
  2. Components and variables should be well-named: consistent, accurate, readable, precise 🐟
  3. Use minimal state

Using the repo

  • Run command npm i to install required node modules;
  • Then, start the development server with command npm run dev.
  • Refactor to improve developer experience, while maintaining the current UI/UX

Questions to consider ahead of feedback session

  • Which of the 3 principles did you prioritise for refactoring?
  • The dev here has made lots of missteps, even though the code works fine; which aspect did you find most challenging to work with?
  • Where is the derived state, and what did you do to fix it?