November 2019
Beginner
804 pages
20h 1m
English
Components can also have their own internal state/data:
props: ['someInput'],
data: function() { return {
foo: this.someInput, };
}
In the preceding example, someInput is passed in and used for the internal state of the component in a foo property. The function needs to be defined so that the state remains internal (remember our previous discussions about encapsulation!).
Read now
Unlock full access