Discussion
Discussion copied to clipboard
Can you watch component property?
When a props value changes should a watch be fired on the prop? It doesn't seem to work.
don't know if it's related but it would be nice if we could use v-referenced attributes on a computed property
I've been successfully watching props
. Fiddle maybe?
@azamat-sharapov yes, a fiddle would be helpful
@therealchiko here you go: https://plnkr.co/edit/nTNcqLBBTA6zTTxRt0Xq?p=preview
If you are trying to use v-model='myProp' it doesn't seem to allow you to watch the 'value' prop inside the component. If you use :value='myProp', it does seem to work though.