When users tap a list item, the next screen often shows a spinner while data loads. By prefetching the required query before navigation, the target screen can render instantly with cached data, delivering a smoother experience. React Query stores the result in its cache, so the subsequent useQuery call becomes a cache hit and skips the network round‑trip.
// ListScreen.tsx
import { useNavigation } from '@react-navigation/native';
import { useQueryClient, useQuery } from '@tanstack/react-query';
import { fetchUserDetails } from './api';