Your Vue prop definitions should always be as detailed as possible, specifying at least type(s):
<script>
props: {
status: {
type: String,
required: true,
validator: value => { return [ 'syncing', 'synced', 'version-conflict', 'error' ].includes(value) }
}
}
</script>
<script>
props: {
status: String
}
</script>
This has two advantages:
If you liked this Vue tip, follow me on Twitter to get notified about new tips, blog posts, and more. Alternatively (or additionally), you can subscribe to my weekly Vue & Nuxt newsletter :
