mirror of
https://github.com/microsoft/frontend-bootcamp.git
synced 2026-01-26 14:56:42 +08:00
* update to hooks * more class to function * cleanup * finish ts final * update html lesson * add lessons page * clean up * move getters into context * adding type * fix bug * step 5 cleanup * init final pass * text tweak * fix ternaries * readme cleanup * fixed root readme
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
- Use the provided
itemCountvalue to display the current number of items left. - Use a ternary operator to print "item" vs "items" based on whether
itemCount === 1.
TodoListItem
- Pull in
labelandstatusfrom props using destructuring - Set the
inputtext tolabeland thecheckedprop totrueifstatus === 'completedNote that this is only half the work we need to do to make these controlled inputs work. What is the other half?