HNHacker News
TopNewBestAskShowJobs

fgerschau

45 karma · joined November 20, 2019

submissionscomments
fgerschau··on Top Web Developer Blogs in 2020
Thanks for sharing!
fgerschau··on When does React re-render? Explaining rerenders and how to optimize performance
By that I mean that there's a difference between calling React's render function and rendering something to the browser DOM (native renders).

React will try to reduce the number of renders to the real DOM as much as possible, so calling a component's render functions doesn't always imply a re-paint of the UI.

Expanding a text box wouldn't usually trigger a re-render because this is being handled by the browser and doesn't affect the state of the application (just like any CSS rules). Reordering elements on the other hand will trigger a re-render because the actual HTML element's position has to change.

So yes, the argument is that the entire screen doesn't have to be repainted. In the ideal case it only repaints the parts of the UI that need to change.

fgerschau··on When does React re-render? Explaining rerenders and how to optimize performance
Why write inefficient code when it's just as easy to do it right?

I also wrote an article about this, if you can write efficient code without sacrificing readability I think it's worth the (small) effort.

https://felixgerschau.com/premature-optimization-javascript

fgerschau··on Ask HN: Where do you store your photos?
Sounds interesting! I don't like dropbox due to the price as well. Also, I'm looking for a better solution in terms of privacy, that's why I'm considering running my own little server
fgerschau··on Ask HN: What are you currently working on?
Is it open source? Mind sharing a link?
fgerschau··on Ask HN: What are you currently working on?
I'm working on pomodoro-timer.app. My next step is to publish it as a PWA to the google play store :)