Skip to content
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

付箋アプリのリストレンダリング #714

Open
knokmki612 opened this issue Jan 24, 2025 · 0 comments
Open

付箋アプリのリストレンダリング #714

knokmki612 opened this issue Jan 24, 2025 · 0 comments

Comments

@knokmki612
Copy link
Member

添字でのリストレンダリングは、リストの変更時(付箋の削除など)に意図しない挙動を引き起こす。

v-for="(sticky, index) in stickies.data"
:key="index"

初学者で、以下を考慮して実装を書き換えるのは大変。

このデフォルトのモードは効率性が高いものの、これが適すのは、リストのレンダリング出力が子コンポーネントの状態や一時的な DOM の状態(フォームの入力値など)に依存しない場合に限られます。

https://ja.vuejs.org/guide/essentials/list.html#maintaining-state-with-key

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant