Vue Nuxt
Tips & Tricks

A collection of Vue, Nuxt and Vite tips, tricks and good practices.

Components using `<script setup>` are closed by default. To explicitly expose properties in a `<script setup>` component, use the defineExpose compiler macro.

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

const a = 1
const b = ref(2)

defineExpose({
  a,
  b
})
</script>