Closed sitek94 closed 4 years ago
Solution I was passing down to Photos component an array with terms like so:
<Photos term={[term, 'trave']} columns={3} />
So I was creating a new array each time and Photos component was thinking that the props change all the time.
When theme is changing the App component re-renders.
I was already using React.memo to prevent unnecessary re-renders of Photos component but it seems that something is not working as expected.