The error is happening in the method messageSubmit
The error reads Uncaught TypeError: Cannot read property 'messages' of undefined
Here's the whole code:
export default {
name: 'App',
methods: {
messageSubmit: () => {
this.messages.push({ username: this.username, text: this.messageValue });
}
},
data() {
return {
messageValue: '',
messages: [],
username: 'Nobody'
};
}
};