arrow_backBACK TO DRILLS
White Beltrules-of-hooksPREMIUM
Conditionally Calling getSorted Inside a Component
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?