Did JavaScript anaylsis just get updated. I have 200 new code smells

Colin This rule seems overreaching to me. It seems ok when we consider .bind functions but not arrow functions.

As React docs states “Using an arrow function in render creates a new function each time the component renders, which may break optimizations based on strict identity comparison.

But for the majority of time React components don’t fall in that category, since memorizing components all around comes with a cost and its benefits for the most part are slim, or none.

Given that, now we face a rule that is covering exception cases. Even worse, now we have to wrap useCallback on these functions unnecessary, and the usage of useCallback itself comes with a cost.

4 Likes