Question from the Vue.js test

How to pass props to a component in VueJS

Medium

Which syntax(es) using the following component is/are valid?

<script setup>
import { defineProps } from 'vue'

const props = defineProps({name: String})
</script>

<template>
  <p>
    hello {{name ?? "world"}}!
  </p>
</template>
Author: AdrienStatus: PublishedQuestion passed 15 times
Edit
0
Community EvaluationsNo one has reviewed this question yet, be the first!