Share fetched state across multiple components using React Query

InstructorTomasz Ducin

Share this video with your friends

Send Tweet

React Query is smart with its caching. When you have a useQuery hook calling the same query in several places, React Query is going to already have the data pre-loaded for other components once the first one is rendered.

It was also fetch data again once it becomes stale.