reactive和ref
时间: 2024-01-07 14:41:34 浏览: 101
reactive和ref是Vue.js中用于实现数据响应式更新的两个API。这两个API在使用方法、适用范围和设计理念等方面有一些区别。
首先,它们的数据类型不同。ref用于包装JavaScript基本类型的数据,而reactive可以用于包装JavaScript对象和数组等复杂类型的数据。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [ref和reactive的区别](https://blog.csdn.net/Xxf909011/article/details/130635325)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
- *2* [# vue3 ref 和 reactive 函数.doc](https://download.csdn.net/download/ranbolee7/86009746)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文