React relies on an state variable's identity to tell when the state has changed. When we push an item into an array, we aren't changing that array's identity, and so React can't tell that the value has changed.
How to fix it: We need to create a brand new array. Here's solution
function handleAddItem(value) {
const nextItems = [...items, value];
setItems(nextItems);
}@Diyorbekk_dev

