I'm creating a similar to netflix app. I have the below use case:
movies.map((movie) => (
<Grid item key={movie.imdbID}>
<Card movie={movie} onIconClick={onIconClick} />
</Grid>
))
I'm wrapping Card component under React.memo but even when one of the movie (watched flag inside it) changes, all the Cards get rendered.
Somehow Card is not getting memoized.
What I might be doing wrong?
How do I prevent re-rendering of all the movies when user has only clicked one card and only that card needs to be updated?