pikax / vue-composable

Vue composition-api composable components. i18n, validation, pagination, fetch, etc. +50 different composables
https://pikax.me/vue-composable/
MIT License
1.18k stars 64 forks source link

useVModel: throw error if instance is not defined. #818

Closed nandi95 closed 3 years ago

nandi95 commented 3 years ago

Returning a ref in the useVModel is somewhat unexpected as it isn't interacting with the props but would still work as expected. This might cause confusion as to why values are not being emitted or worse yet despite the getCurrentInstance() console warning, making it into production.

I think an error should be thrown causing the script to terminate. This could be considered a breaking change.