Skip to content

Update components-dynamic-async.md #194

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 19, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/v2/guide/components-dynamic-async.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ new Vue({
</style>
{% endraw %}

게시물을 선택하고, _Archive_ 탭으로 전환하고, 다시 *Posts*로 전환할 때, 선택했던 게시물이 더는 보지 않는 것 알아차릴 수 있습니다. 그 이유는 매번 새로운 탭을 선택할 때, Vue는 `currentTabComponent`의 새로운 인스턴스를 생성하기 때문입니다.
게시물을 선택하고, _Archive_ 탭으로 전환하고, 다시 *Posts*로 전환할 때, 선택했던 게시물이 더는 보이지 않는 것 알아차릴 수 있습니다. 그 이유는 매번 새로운 탭을 선택할 때, Vue는 `currentTabComponent`의 새로운 인스턴스를 생성하기 때문입니다.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
게시물을 선택하고, _Archive_ 탭으로 전환하고, 다시 *Posts*전환할 때, 선택했던 게시물이 더는 보이지 않는 알아차릴 수 있습니다. 그 이유는 매번 새로운 탭을 선택할 때, Vue는 `currentTabComponent`의 새로운 인스턴스를 생성하기 때문입니다.
게시물을 선택하고, _Archive_ 탭으로 변경하고, 다시 *Posts*변경할 때, 선택했던 게시물이 더는 보이지 않는 것을 알아차릴 수 있습니다. 매번 탭을 선택할 때, Vue는 `currentTabComponent`의 새로운 인스턴스를 만들기 때문입니다.

발견해주셔서 감사합니다

다시 읽어보고 이상한 부분을 수정했습니다

확인하신 다음 마음에 드시면 suggestion block 의 내용을 commit suggestion 버튼을 눌러 수락해주세요


동적 컴포넌트를 재생성하는 것은 보통은 유용한 동작입니다. 하지만 이 경우에는, 탭 컴포넌트 인스턴스가 처음 생성될 때 캐시 되는 것을 선호합니다. 이런 문제를 해결하기 위해서, 동적 컴포넌트를 `<keep-alive>` 엘리먼트로 둘러쌀 수 있습니다. :

Expand Down