Replies: 1 comment
-
Not sure that I fully understand the use-case, but why don't you just set |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Now the
setData()
method looks like this,but I would like to be able to use the
setQueryData()
method to set data without creating a deep copy by the library and disabling the structural sharing.I suggest adding the
copy
field to the existing config, which will mean that there is no need to create a deep copy. Then the
setData()
code should look like thisand the call to
setQueryData()
will look like thisWhat is it for?
Now I am developing a library for normalizing the cache and a wrapper for react-query and I would like to eliminate the need to create a deep copy of the data, not counting that it wastes crumbs of performance, this behavior also does not allow having the same entities in different queries
Beta Was this translation helpful? Give feedback.
All reactions