4 ms·
It's both. You should be able to control it, but can have a same default that does it for you automatically under certain conditions. Unfortunately React forces
by valenterry 4y ago
It's both. You should be able to control it, but can have a same default that does it for you automatically under certain conditions. Unfortunately React forces the latter only
- Existenceblinks 4y agoYes, practically force re-render comes with unnecessary mechanism to prevent it from happening, and there are unimaginable cases of state mutation that shouldn't force re-render. Example situation: changing state A, B and C, re-rendering, changing B again, not rendering. Auto-render + prevention mechanism is inferior means compared to just having `render` and just calling it whenever and wherever.