3 ms·
nit: I've never understood why people use the term re-rendering for vdom recomputations. I'm not a native english speaker but as I understand it, rendering mean
by The_rationalist 7y ago
nit: I've never understood why people use the term re-rendering for vdom recomputations.
I'm not a native english speaker but as I understand it, rendering means <calculating and/or firing> pixels at the screen.
So this term should only be used for step 3)
For vdom the term used should simply be re-computing or re-calculating or updating or diffing.
- dwb 7y agoYes and no. "Rendering" in computing has historically mostly meant what you say, but it is defined much more broadly in the dictionary. There's clearly no pressing need to distinguish the pixely variety from virtual DOM calculation with the term (otherwise it wouldn't have caught on), and it works by analogy, so I think it's fine. There's no "should" with language unless people can't understand you.
- The_rationalist 7y agoThere's clearly no pressing need to distinguish the pixely variety from virtual DOM calculation with the term (otherwise it wouldn't have caught on) There is a need: in order to maximise performance, we often talk about avoiding needless vdom recomputations and also about avoiding the browser to recalc the layout aka rerender. If I say in a commit "avoid needless re-rendering of CardList when a Card is added" You cannot understand the nature of the performance issue if you use both re-rendering for vdom and layout. Indeed language evolve to a local minima of being good enough to understand each other good enougthly in most cases. I would have hoped language evolution to improve over time but the world is not ready for creating an institution that would allow that. In the meantime, I and others that understand that maximising semantical understanding matter, will keep voicing.
- _bxg1 7y agoMainly because the React method that gets called is literally "render()". Also, "render" is a more abstract word than that, and can really apply to anything being derived from something else: https://en.m.wikipedia.org/wiki/Rendering_(animal_products)#Rendering_processes_for_edible_products https://en.m.wikipedia.org/wiki/Rendering_(animal_products)#... That said, I can see how the multiple adjacent uses of the term might get confusing