vuejs / core

🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
https://vuejs.org/
MIT License
45.6k stars 8k forks source link

refactor(reactivity): extract isRef to shared #11202

Closed ferferga closed 5 days ago

ferferga commented 1 week ago

After the merge of #7306, I noticed that isRef is redeclared in shared because shared can't have dependencies (didn't thought about that during the reviewing, sorry!). However, reactivity has shared as a dependency.

I think it makes more sense to have a single implementation in shared (and re-export from reactivity) for better tree-shaking and maintainability

yyx990803 commented 5 days ago

The core logic of isRef should live in @vue/reactivity. The duplication is ok.