mirror of
https://github.com/microsoft/frontend-bootcamp.git
synced 2026-01-26 14:56:42 +08:00
13 lines
605 B
Markdown
13 lines
605 B
Markdown
## Exercise
|
|
|
|
### TodoFooter
|
|
|
|
1. Use the provided `itemCount` value to display the current number of items left.
|
|
2. Use a ternary operator to print "item" vs "item**s**" based on whether `itemCount === 1`.
|
|
|
|
### TodoListItem
|
|
|
|
1. Pull in `label` and `completed` from props using [destructuring](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment#Object_destructuring)
|
|
2. Set the todo's text to `label` and the `checked` prop to `completed`
|
|
> Note that this is only half the work we need to do to make these controlled inputs work. What is the other half?
|