ReactTraining / react-media

CSS media queries for React

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Avoiding wasted render/re-render

jsphkhan opened this issue · comments

When using React "Why Did You Update" (why-did-you-update) module to help debug and find wasted renders, I found the Media component to be re-rendering unnecessarily. Has this been brought into notice by anyone earlier. If not, please let me know of any suggestion,

hotels__find_cheap_hotels__hotel_deals__hotel_booking___altayyar_online

I'm sorry, but there isn't enough information here to help you. Re-renders could be caused by parent components passing new props. But the only time the state of a <Media> component changes is when the state of its media query changes.