question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Property or method xxx is not defined on the instance but referenced during render.

See original GitHub issue

I have a Record component which contain a RecordHistoryModal component in its template. And the showHistoryRecords, handleSubmit are methods of Record. But when I show the RecordHistoryModal, I got Property or method "showHistoryRecords" is not defined on the instance but referenced during render. error. The full error log shown these method are not in RecordDetailModal.

vue.runtime.esm.js?2b0e:619 [Vue warn]: Property or method "showHistoryRecords" 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. See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.

found in

---> <RecordDetailModal> at src/views/patient/RecordDetailModal.vue
       <Anonymous>
         <Anonymous>
           <Anonymous>
             <Anonymous>
               <AModal>
                 <RecordHistoryModal> at src/views/patient/RecordHistoryModal.vue
                   <AForm>
                     <class2> at src/views/patient/Record.vue
......

However the showHistoryRecords, handleSubmit did work although these errors.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
Ding-Fancommented, Apr 5, 2020

In my situation, the warning is showing because I initialized the property with undefined .

private typeId: any = undefined

I changed the initial value to empty string then the warning is gone.

private typeId: any = ''
1reaction
CreeTarcommented, Jul 15, 2020

In my situation, the warning is showing because I initialized the property with undefined .

private typeId: any = undefined

I changed the initial value to empty string then the warning is gone.

private typeId: any = ''

Why would that be correct? undefined should be allowed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Property or method "value" is not defined on the instance but ...
Property or method "value" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in...
Read more >
[vue3] Property xxx was accessed during render but is not ...
In Vue.js, the error generally means you are referring to a variable which could be a data, prop, method or computed property in...
Read more >
How to solve the "Property or method XXX is not defined on ...
How to solve the "Property or method XXX is not defined on the instance but referenced during render" in Vue.js. One common error...
Read more >
property was accessed during render but is not defined on ...
Your application instance which is mounted to #contact-form-inputs contains a reference to options in its template - but there is no such data...
Read more >
VUE报错:Property or method “****“ is not defined on the ...
VUE报错:Property or method “****“ is not defined on the instance but referenced during render ... 翻译一下:在实例渲染期间,属性或方法XXX没有定义 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found