DEV Community

Discussion on: How to write more performant functional React Components

Collapse
exclipy profile image
exclipy

On your codesandbox: you should remove the useCallback. It's not doing anything but overhead.

Collapse
maxgrafx profile image
maxgrafx

i would think not using useCallback creates overhead, without it every render the function is recreated

Collapse
exclipy profile image
exclipy

Also with it, the function is created on every render. See kentcdodds.com/blog/usememo-and-us...