-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Closed
Description
Describe the bug
I'm trying to mock some data because the type for data is Ref, but according to the warning is a redonly one?
https://vuejs.org/api/reactivity-core#readonly
const {
data: ladders,
isLoading,
refetch
} = useQuery<LadderListResponse[]>({
queryKey: ['ladders'],
queryFn: () => competitionsApi.getLadders(),
initialData: [],
placeholderData: []
});
onMounted(async () => {
await refetch();
ladders.value = [
{
id: 1,
name: 'Ladder 1',
type: 'classic',
visibility: 'public'
}
];
});
Your minimal, reproducible example
Explained in description
Steps to reproduce
Explained in description
Expected behavior
Being able to modify data or change the type of it
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
- OS: macOS, Windows, Linux, iOS, Android
- Browser: Chrome, Safari, Firefox
Tanstack Query adapter
vue-query
TanStack Query version
5.92.7
TypeScript version
5.9.3
Additional context
vue - 3.5.26
Metadata
Metadata
Assignees
Labels
No labels