Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

vue 3 props

<script setup> // vue 3 component
const props = defineProps({ // No need to import defineProps!
  title: String, likes: Number, isPublished: Boolean,
  commentIds: Array, author: Object, callback: Function,
  contactsPromise: Promise // or any other constructor
})
... use props.title ... props.contatcsPromise
</script>
Source by v3.vuejs.org #
 
PREVIOUS NEXT
Tagged: #vue #props
ADD COMMENT
Topic
Name
3+8 =