3 ms·
The rule about unconditional calls tends to sound weird (I personally found it very strange when I first saw it), but in my experience, people do not have a har
by sophiebits 8y ago
The rule about unconditional calls tends to sound weird (I personally found it very strange when I first saw it), but in my experience, people do not have a hard time following it – it’s very rare to want a variable number of state fields, for example.
If you do end up making a mistake, React has both lint rules provided and runtime checks to catch any errors. But from watching many people learn and use Hooks, we haven’t seen it to be a problem in practice.