DEV Community

Discussion on: React Hooks: Test custom hooks with Enzyme

Collapse
 
stereobooster profile image
stereobooster

use useMemo or useCallback for onChange function inside your hook

Collapse
 
flexdinesh profile image
Dinesh Pandiyan

I understand why we would need to use useMemo or useCallback but to keep the example simple, it's a good idea to avoid them.