Is using 'useCallback' inside 'select' option a good pattern?
I saw somewhere that
useCallback should be used inside an expensive select
is that still the a good practice?2 Replies
unwilling-turquoise•3y ago
1) yes but slicing an array is not expensive
2) you're not using id inside the function so why would it be a dependency?
afraid-scarletOP•3y ago
1) was just for the example here
2) same (my mistake)
Thanks