arrow_backBACK TO DRILLS
White Beltrules-of-hooksPREMIUM
Conditional Hook calls vs regular functions
A component conditionally calls getSorted(items) inside an if block. The function sorts an array but does not call any Hooks internally. Why is this valid React code?