[Vue warn]: Property or method is not defined on the instance but referenced during render

Problem [Vue warn]: Property or method “changeSetting” is not defined on the instance but referenced during render. Make sure to declare reactive data properties in the data option. (found in <MainTable>) The error is occurring because the changeSetting method is being referenced in the MainTable component here: “<button @click=’changeSetting(index)’> Info </button>” + However the changeSetting … Read more

How to add external JS scripts to VueJS Components?

A simple and effective way to solve this, it’s by adding your external script into the vue mounted() of your component. I will illustrate you with the Google Recaptcha script: <template> …. your HTML </template> <script> export default { data: () => ({ ……data of your component }), mounted() { let recaptchaScript = document.createElement(‘script’) recaptchaScript.setAttribute(‘src’, … Read more