You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sometimes there are cases where the request to update some properties from the results returned from data (data that knows for sure has been updated.. for example the number of likes returned from another request) will be is a huge cost to reassign the entire data because vue will recalculate all that is involved in it even though there is so little change
i could use v-memo or create another wrap similar to dataR with watchEffect but there is no reason to waste memory like that when we just need to add an option
建议的解决方案 Proposed Solution
added option to use ref instead of shallowRef for data in vue-request@next
example fullRef: true
- const data = shallowRef() const data = fullRef ? ref() : shallowRef()
其他信息 Other information
The text was updated successfully, but these errors were encountered:
tachib-shin
changed the title
[Feature Request]: added option to use ref instead of shallowRef for data in vue-request@next`
[Feature Request]: added option to use ref instead of shallowRef for data in vue-request@nextJan 1, 2023
需求描述 Feature Description
sometimes there are cases where the request to update some properties from the results returned from
data
(data that knows for sure has been updated.. for example the number of likes returned from another request) will be is a huge cost to reassign the entiredata
because vue will recalculate all that is involved in it even though there is so little changei could use
v-memo
or create another wrap similar todataR
withwatchEffect
but there is no reason to waste memory like that when we just need to add an option建议的解决方案 Proposed Solution
added option to use
ref
instead ofshallowRef
fordata
invue-request@next
example
fullRef: true
其他信息 Other information
The text was updated successfully, but these errors were encountered: