using same query for entries app

How to use same query for many components? I don't want to request api for many times ;-; I can't passing by props because I have Header component that wrapper in Layout component and I want to use query in Header component too If i'm do this It's will need to run query 2 times
3 Replies
Solution
Nick
Nick2y ago
React Query automatically caches queries so if you’re using our integration you just call the query in each component Watch the network tab and you’ll see just 1 request
หยอมแหยม
ah i see tysm!