useQuery caching and layout question
Hello! Right now I have multiple nested layout pages in next 14 fetching data using useQuery . Is there caching for same queries or will it call each time on the client when using useQuery ? Cuz I call it 4 times in separate layouts. Seems like a bad practice at a glance but it it’s helpful not having to prop drill down. Any advice on best practice here ?
1 Reply
Convex handles this automatically. As long as it's an identical query request (same parameters), using
useQuery
repeatedly will only make one network request.