A comparison between useMemo and useCallback