TanStackT
TanStack3y ago
6 replies
spontaneous-moccasin

Is it good practice to pass successful query data in Context ?

When using useQuery, you usually check if data is available (not fetching, no error). Once this check is made, does it make sense to pass the available data in a React <Context> so that all componenents within that tree do not have to check again if the data is fetching or not ?
Was this page helpful?