Ex 1. (LikeButton, DislikeButton, Students, StudentsDetail)
- LikeButton and DislikeButton (setCount with function OR directly in button)
- Students - handleSort
- StudentDetail - passing state and functions
Ex 2.
- in App create state - useState(shoppingList)
- pass state (App - ShoppingList - ShoppingItem)
- pass handleCheck (App - ShoppingList - ShoppingItem) -> ternary operator with css (ShoppingItem)
- pass handleDelete (App - ShoppingList - ShoppingItem)
- pass handleAdd to AddItem
- showForm with tenerary operator and setShowForm inside button without writing function, setShowForm back to false in handleAdd (after clicking add)
- handleSearch, create new searchList, and pass it as props to ShoppingList