// Do TanStack Query results need a second store? // Teaching excerpts; see the explanation and boundaries on the episode page. // Read the cache where you need it. useQuery({ queryKey: ["products"], queryFn: () => getProducts(), staleTime: 30_000 }); // A key identifies the requested data. useQuery({ queryKey: ["products", category], queryFn: () => getProducts(category) }); // A local draft is different. const [draft, setDraft] = useState("");