Skip to content

Commit 1b43910

Browse files
authored
Create Vue js.md
1 parent e883bd1 commit 1b43910

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

Web/고생길/Vue js.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# 👊🤢
2+
3+
## Vue Error
4+
### Vue 무한 render 늪
5+
6+
window.opener['app']에 parent VueComponent 추가해서 해당 vue에 있는 내용 참조하는 Popup을 띄우고 부모 창에서 다른 페이지로 이동하려고 하면 무한 루프에 빠지는 오류 발생
7+
8+
```
9+
vue.runtime.esm.js?2b0e:619 [Vue warn]: You may have an infinite update loop in a component render function.
10+
```
11+
12+
반응형으로 참조해서 생기는 문제 발생 (window.opener['app']이 변경되면 무한 렌더링 발생하는 것 같다..아마..?)
13+
14+
``` typescript
15+
// 변경 전
16+
const state = reactive({
17+
parent: '',
18+
});
19+
state.parent = window.opener['app'];
20+
21+
// 변경 후
22+
let parent = window.opener['app'];
23+
```
24+
25+
> **렌더링** 관련해서 더 공부해볼 것
26+
27+
* 참고
28+
29+
https://stackoverflow.com/questions/43151265/you-may-have-an-infinite-update-loop-in-a-component-render-function
30+

0 commit comments

Comments
 (0)