Closed FedorSherbakov closed 1 year ago
Guess need to update something else to make types to accept ref
as well
Should be like
import type { Ref } from 'vue';
export type GetTodoNotesQueryParameters = {
id: number | Ref<number>;
};
But I'm not sure how to do that yet
Thanks for the suggestion! Couple of questions though (I'm not familiar with Vue, so sorry if it's something obvious :)):
export function useGetPetByIdQuery(dto: GetPetByIdQueryParameters, ...)
export function useGetPetByIdQuery(petId: number,...)
Should the second one be changed as well to
export function useGetPetByIdQuery(petId: Ref<number>,...)
?
ReactQuery.liquid
file works, but I hope you don't mind if I'd try to come up with something regex-based so that it's easier in support (if/when ReactQuery.liquid
changes)So, version 15.2.9 includes these Ref changes that you did, hopefully it works as expected
Allows to use refs which is really useful
Consider such example
The second request will be triggered only after the first one is finished. So, we will know todo's id later only and using
ref
it becomes reactive