DEV Community

Discussion on: Introduction to React.memo, useMemo and useCallback

Collapse
 
dinhhuyams profile image
TrinhDinhHuy

If you pass something with reference type such as function then YES we can use useCallback to prevent the re-render. Otherwise it's not necessary if you pass primitive values (boolean, string, ..)