Skip to content

Latest commit

 

History

History
14 lines (9 loc) · 950 Bytes

README.md

File metadata and controls

14 lines (9 loc) · 950 Bytes

Step 1.6 - Creating a state-driven UI (Exercise)

If you don't already have the app running, start it by running npm start from the root of the frontend-bootcamp folder. Click the "exercise" link under day 1 step 6 to see results.

TodoFooter

  1. Use the provided itemCount value to display the current number of items left.
  2. Use a ternary operator to print "item" vs "items" based on whether itemCount === 1.

TodoListItem

  1. Pull in label and status from props using destructuring
  2. Set the input text to label and the checked prop to true if status === 'completed

    Note that this is only half the work we need to do to make these controlled inputs work. What is the other half?