Dates as keys - prefetching
I'm after some guidance or best practice when it comes to prefetching, some of my queries have a LOT of options and live in it's own composable. But then to prefetch, I have to know the query key in advance. This becomes very tricky when dates and date ranges are involved. Does anyone have any tips/tricks in terms of structure your queries? Do you have a single
useFetchUsers
query and then useFetchUser
query composable files? Where do you actually keep these? And do they export the default query key or something for prefetch? Or does the prefetch live within those composables? Any tips much appreciated!0 Replies