Router + Query integration // route invalidation
I'm torn between 2 things:
then either:
which is extremely simple, does not need any loading management of any kind but needs double cache invalidation:
or:
where there's no double cache invalidation needed, but a double api declaration (the query options in both loader and useSuspenseQuery)
what i could see as a workaround is:
but i don't know how to type
...and it's still not as appealing DX as the very 1st one, which only have an issue of route caching data on top of react-query caching data (and subscriptions)
please advice
then either:
which is extremely simple, does not need any loading management of any kind but needs double cache invalidation:
or:
where there's no double cache invalidation needed, but a double api declaration (the query options in both loader and useSuspenseQuery)
what i could see as a workaround is:
but i don't know how to type
params and search. I have tried ReturnType<(typeof Route)['useParams']> but it returns any ...and it's still not as appealing DX as the very 1st one, which only have an issue of route caching data on top of react-query caching data (and subscriptions)
please advice