Report
The Most Common Mistakes When Using React
Discover common React mistakes that developers make when using hooks, managing state, and rendering components. Learn how to identify and fix these mistakes to improve your application's performance and maintainability.
claritydev.net
Good article. However you have broken the rule 'Incorrectly relying on the current state value for calculating the next state' inside 'Working with simple arrays'.
You shouldn't have
setItems([...items, item]);
but instead
setItems((items) => [...items, item]);
In that specific case it's actually not necessary to use the updater function since React will correctly handle the update.