-
-
Save wmelton/534f7466e536d215d4c50e5d7a861a93 to your computer and use it in GitHub Desktop.
Vue Prop Key Error Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Child Component | |
<template> | |
// ... some template code | |
</template> | |
<script setup lang="ts"> | |
const props = defineProps({ | |
key: { | |
required: true, | |
type: String | |
} | |
}) | |
</script> | |
// Parent Component | |
<template> | |
<ChildComponent key="xyz" /> | |
</template> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment