State Management · Middle · Question 61 of 75

How does initialData differ from placeholderData in TanStack Query?

Explanation

Use initialData when you truly have the data (e.g. from a list); use placeholderData for previews or keeping previous data while fetching.

Further reading

Problem with a question

State Management · Middle · question 61

Test yourself

Take the State Management · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz