\n\n\n```","suggestedAnswer":[{"@type":"Answer","text":"``"},{"@type":"Answer","text":"``"},{"@type":"Answer","text":"``"}],"acceptedAnswer":[{"@type":"Answer","text":"``"},{"@type":"Answer","text":"``"}]}}

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 27 times
Edit
0
Community EvaluationsNo one has reviewed this question yet, be the first!