component/admin
, component/kiosk
, component/guest
타입을 반드시 명시해야하며, 자세히 작성할수록 좋다
const props = defineProps(['status']) // 안돼
//이렇게 작성하기 안하면 사형
const props = defineProps({
status: {
type: String,
required: true,
validator: (value) => {
return ['syncing', 'synced', 'version-conflict', 'error'].includes(
value
)
}
}
})
//안좋음
<ul>
<li v-for="todo in todos">
{{ todo.text }}
</li>
</ul>
//좋음
<ul>
<li
v-for="todo in todos"
:key="todo.id"
>
{{ todo.text }}
</li>
</ul>