Property or method xxx is not defined on the instance but referenced during render.
See original GitHub issueI 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:
- Created 4 years ago
- Comments:6 (1 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
In my situation, the warning is showing because I initialized the property with
undefined
.I changed the initial value to empty string then the warning is gone.
Why would that be correct? undefined should be allowed.