Skip to main content

What it flags

A list rendered with h() has no key prop, or an element in a .vue template uses v-for without a key. A stable key lets Vue reuse the matching nodes when the list changes. A v-for on a <template> wrapper is not reported. Vue 2 requires the keys on the wrapper’s children, while Vue 3 requires the key on the <template> itself. Loadwise does not detect the Vue version, so a keyed or unkeyed wrapper could be correct. Element loops inside the wrapper are still checked.

Fix preview

For a native element in a supported .vue template, Loadwise can preview adding :key when a direct item property already supplies the element’s id. Review the preview and confirm that the property is unique within the list and stays stable across updates. Handle h() findings manually. Loadwise also withholds the preview for components, complex or ambiguous ID expressions, and markup where the insertion point cannot be established. If a dynamic binding might already supply the key, Loadwise leaves the element out of the findings. Vue files larger than 1 MiB or files that cannot be read are reported as skipped.

Configuration

Set the rule to "off" in loadwise.config.json to drop its findings: