BKWLD / vue-tween-number

A Vue component that tweens a number value.
MIT License
5 stars 7 forks source link

Prop being mutated: "formatter" #3

Open tradingstratagem opened 6 years ago

tradingstratagem commented 6 years ago

Hi,

when I run unit test in a component using this library I have the following warning:

[Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead, use a data or computed property based on the prop's value. Prop being mutated: "formatter"

Here the code:

weotch commented 6 years ago

Looks like your code got stripped...

tradingstratagem commented 6 years ago

<tween-num :value="balance" :formatter="value => formatCurrency(value)"></tween-num>