Skip to content
public-library›Rules›TanStack Query›Use initialData only for complete data

Use initialData only for complete data

Pass initialData only when you have the complete, authoritative value for a query. Use placeholderData for anything partial or temporary, such as a preview from a list or the previous page while the next one loads.

In the full rule