|
|
|
|
|
by strogonoff
566 days ago
|
|
Not sure, assuming a change in context through useContext() directly counts as state change and memo does not prevent re-renders on state changes… Generally, re-renders should not be a problem (assuming nothing changed for this component it is a no-op as far as its DOM is concerned), but that is a separate issue, I suppose. I did have to worry about re-renders on a few occasions (and it never feels great when you put effort into memoing each prop for reference quality, but something still causes a rerender from within). |
|