I have a list of cards. When I add them to favourites by pressing a button, it changes the color of that button. However, I just want that particular card to re-render after adding to favourites.
const addFavouriteHandler = useCallback((id: number) => {
dispatch(addFav(id));
}, [ ?? ])
// This is my card in the list
<MovieCard
key={movie.id}
movie={movie}
addFavourite={addFavouriteHandler}
removeFavourite={removeFavouriteHandler}
isFavourite={isFavourite}
/>
What would be the dependencies of the useCallback here?