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

Maybe they forgot some `memo` so it re-renders everything including iframes all the time.


1) In React, re-renders don't destroy the DOM. So nothing would happen if iframes were re-rendered.

2) Rather, we intentionally unload interactive editor preview iframes to improve memory usage when you scroll away from them. We do load them again when you scroll up — and normally that would be instant because the code for them would get cached. But the author has intentionally disabled cache, so as a result they get arbitrarily high numbers when scrolling up and down.




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

Search: