Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I saw in a recent tweet (can't find now) that React-based web apps were draining mobile phone batteries significantly faster than the comparison, because, with the constant re-renders, they were generating a heavier CPU load. This is something I had never thought about before.


It makes sense, if it's changing very quickly and re-rendering the whole component tree -- say it's some kind of realtime stream of updates or a graphql subscription. And then of course you should try and optimize so only that component is re-rendered. My main argument is against people who try to argue that you should memoize a form input field or a div or something that changes once every few seconds or so. It's just pointless.


That app could be just as battery draining as a vue or angular app. We’d have to know the details.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: