- Add
key
when rendering lists - WE suggest you never compare the object with another object with strict comparison. It could produce a lot of bugs. Compare object using their unique identifier (id, title)
BAD EXAMPLE:
if (cat === selectedCat) {
GOOD EXAMPLE:
if (cat.id === selectedCat.id) {