Javascript – Can't use custom hooks inside 'queryFn' which is a property of 'useQuery' (tanstack query)
I here want to fetch all 'products' using react query BUT 'build process' fails when using custom hooks inside 'useQuery', so it throws error in 'build process' but it works perfectly fine during 'development server' const { data, isPending, isError,…