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 times3 Replies
Solution
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!