Every Composition API component ended with a return statement listing what it had just declared, which is information a compiler can work out.
// 3.0
export default {
setup() {
const count = ref(0)
const double = computed(() => count.value * 2)
function increment() { count.value++ }
return { count, double, increment }
},
}
// 3.2
<script setup>
const count = ref(0)
const double = computed(() => count.value * 2)
function increment() { count.value++ }
</script>
Every top-level binding is exposed to the template, which removes the return and also removes the ability to declare something the template must not see — a private helper is now visible, harmlessly but visibly. The compiled output is marginally more efficient than the explicit form, because the compiler can inline the render function into the setup scope instead of going through a proxy. It is stable from 3.2 and was experimental before, which is why the archive has none of this earlier.