왜 발생하는 걸까요??Property or method "store" is not defined on the instance but referenced during render.
1570
작성한 질문수 3
Todo-Header.vue 파일에 코딩된 내용은 아래와 같습니다.
<template>
<header>
<!-- <h1>TODO it!</h1>-->
<h1>{{ this.$store.state.headerText }}</h1>
</header>
</template>위 코드를 실행했을때 store 못 찾는 다고 나오는데 이유를 모르겠네요 ㅠ.ㅠ
[Vue warn]: Property or method "store" 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://v2.vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.
found in
---> <TodoHeader> at src/components/TodoHeader.vue
<App> at src/App.vue
<Root>
답변 2
0
저는 아래 방법으로 해결됐습니다.export const store = new Vuex.Store({});
⇓ "export default" 로 수정export default new Vuex.Store({});
Chrome 개발자 모드 확장이 안됨
0
270
1
깃 권한 요청드립니다
0
118
1
vue.js 중급 리포지토리 권한 관련
0
118
1
vuex + axios 질문 있습니다!
1
198
2
깃 권한 요청드립니다!
0
162
1
강의 깃주소 문의
0
145
1
router-view에 props를 어떻게 넘길 수 있나요?
1
281
2
Vue가 인식되지 않는 현상
0
207
1
기초강좌는 어디있나요?
1
191
2
App.vue가 필요한 이유
0
193
1
getter가 정의되어 있지 않아 오류가 발생합니다.
1
256
1
뷰 라이프사이클
1
188
1
TSLint 말고 TSLint Vue 설치해도 되나요?
1
369
3
로컬 스토리지는 어디에 있나요?
1
282
1
vuex 실행시 새로고침해야지만 리스트에 나타나는 현상
1
391
2
export default 관련한 질문
0
356
2
깃허브 vue-todo 접근불가에 따른 확인요청
1
354
2
깃허브에 문제있는것 같습니다.
1
275
2
인프런 강의 재생 화면 구성 변경 문의드립니다
1
306
2
addTodo Helper 함수 적용
1
244
1
vuex 헬퍼 전역 설정
1
248
2
github 권한요청드립니다.
1
258
2
이벤트 위치에 대한 궁금증 입니다.
1
224
2
구조 차이에 대한 문의
1
347
2





