I'm a newcomer to vue JS and facing a challenge with creating vue class components. My setup includes:
@rails/webpacker: "^5.1.1" typescript: "^4.0.2" vue: "^2.6.11" vue-class-component: "^7.2.5"
Below is the code snippet:
MockChat.vue
<template>
<!-- Your template code here -->
</template>
<script lang="ts">
// Your script code here
</script>
You're encountering the following warning:
[Vue warn]: Property or method "messages" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property
The issue arises when passing messages
data to Chat component where it's not being recognized.
Even after using the data: {}
option to declare the data properties, the error persists.
If you have any insights or solutions, your help would be greatly appreciated.