Skip to content

[vue-query]An error occurred when attempting to modify the data returned by useQuery #4750

@liect

Description

@liect

Describe the bug

The data returned by useQuery is wrapped in a Ref object with an additional layer of Reactive wrapping inside.
When I attempted to modify it, Vue gave me a warning that it is not modifiable.
_20230104142307
_20230104142330

Your minimal, reproducible example

null

Steps to reproduce

In the Vue devtools, it shows as Reactive.

Expected behavior

[Vue warn] Set operation on key "desc" failed: target is readonly. Proxy {id: 67, name: 'library/xmrig/xmrig:v1', desc: '', image_list: Array(1), node_list: null, …}

How often does this bug happen?

Every time

Screenshots or Videos

No response

Platform

Win11
Chrome latest
Vue latest

TanStack Query version

vue-query 4.20.5

TypeScript version

4.9.4

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions