Difference between `fetchQuery` and `ensureQueryData`?
The docs for
But, isn't that what
queryClient.ensureQueryData says:ensureQueryData is an asynchronous function that can be used to get an existing query's cached data. If the query does not exist, queryClient.fetchQuery will be called and its results returned.
But, isn't that what
fetchQuery already does kind of? Returns the query data if it's already fetched, and does the fetch if it's not?