3 ms·
probably the parent poster does not use React so it would seem a heavy demand on a human to make, given the already stated limited cognitive energy and time. I
by bryanrasmussen 2y ago
probably the parent poster does not use React so it would seem a heavy demand on a human to make, given the already stated limited cognitive energy and time.
I suppose I would think not rendering twice and some sort of warning about side effects would be beneficial, rendering twice means that you get a misleading view of what your application behavior is, I can see how people would - from an architectural perspective - consider it bad without necessarily using the framework.
- kaoD 2y ago> some sort of warning about side effects would be beneficial Rendering twice is exactly what allows you to detect that. How would you detect a side effect if not by calling the function twice? React's contract is that your component should be allowed to render twice without any changes so this is just upholding the invariant in dev mode.
- hu3 2y agoI do also use React, unfortunately.
- bryanrasmussen 2y agomy mistake, I feel your pain.