Discussion
Discussion copied to clipboard
Consider pre-initializing the property with the "data" option for more reliable reactivity and better performance
trafficstars
this is my code, https://jsfiddle.net/0od4hwmh/2/ it can be running when pick it out, but when put it in my project of laravel 5.3, there is an error:
[Vue warn]: You are setting a non-existent path "chosenFruite" on a vm instance. Consider pre-initializing the property with the "data" option for more reliable reactivity and better performance.
What is the probable problem?
chosenfruite was outside of the data property. It should be initialized in the data, like the items array.
Example: https://jsfiddle.net/0od4hwmh/3/
@LinusBorg
it doesn't work.
Well, my provided example does work: it sets chosenfruite correctly, and no warning is displayed.
What does not work for you?