vue-request
vue-request copied to clipboard
[Feature Request]: added option to use `ref` instead of `shallowRef` for `data` in `vue-request@next`
需求描述 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 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()