반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 |
Tags
- Tomcat Error
- 웹 크롤링
- javascript
- 프록시 예제
- spring
- Visual Studio 2015 삭제
- vue3
- vue
- Visual Studio 2015 강제 삭제
- 웹 자동화
- MSSQL 동적 쿼리
- Selenium 환경
- 리버스 프록시 예제
- Visual Studio 패키지에 실패했습니다.
- Visual Studio 2015 설치
- SQLP
- 디자인 패턴 사례
- Vue configureWebpack
- vue.js
- .NET Core
- Vue3 configureWebpack
- Selenium 설치
- tomcat
- .NET Core Proxy
- Visual Studio 재설치
- Visual Studio 강제 삭제
- Nginx Reverse Proxy
- 업무 자동화
- Vue.config
- MSSQL 문자열
Archives
- Today
- Total
금백조의 개발 블로그
[Vue.js] [Vue warn]: Property ~ was accessed during render but is not 에러 해결 방법 본문
Web/Vue.js
[Vue.js] [Vue warn]: Property ~ was accessed during render but is not 에러 해결 방법
금백조 2023. 4. 16. 18:00반응형
현상
Vue 강의를 보며 프로젝트를 진행하던 중 아래와 같은 에러메세지가 크롬 콘솔 창에 나타나면서 자식 컴포넌트가 화면에 나타나지 않았다.
[Vue warn]: Property "type" was accessed during render but is not defined on instance.
원인
부모 컴포넌트에서 type 객체를 자식 컴포넌트한테 전달해주려 하는데 자식 컴포넌트에 type이 props 내부에 선언되지 않은게 원인이었다.
parentComponent.vue (부모 컴포넌트)
<childComponent
:type="parentType"
/>
childComponent.vue (자식 컴포넌트)
<script>
export default {
props: {
},
type: {
type: String,
default: 'default type'
}
}
</script>
해결
자식 컴포넌트 props 내부에 type을 선언해준다.
childComponent.vue (자식 컴포넌트)
<script>
export default {
props: {
type: {
type: String,
default: 'default type'
}
}
}
</script>
반응형