Uploaded January 2026 | Updated November 2026, 3 hours ago
📕 Nuxt Course: https://www.learnnuxt.dev/
checkout.teachable.com/secure/1251673/checkout/order_km5x8ssv?coupon_code=YOUTUBE
In this video we take a look at the defineExpose complier macro with Vue.
Components using script setup are closed by default - i.e. the public instance of the component, which is retrieved via template refs or $parent chains, will not expose any of the bindings declared inside script setup.
To explicitly expose properties in a script setup component, use the defineExpose compiler macro.
Other Resources
📕 Vue 3 Course: johnkomarnicki.gumroad.com/l/tqrmw
🤖 Website: johnkomarnicki.com
🐦 Twitter: twitter.com/john_komarnicki
📕 Nuxt Course: https://www.learnnuxt.dev/
checkout.teachable.com/secure/1251673/checkout/order_km5x8ssv?coupon_code=YOUTUBE
In this video we take a look at the defineExpose complier macro with Vue.
Components using script setup are closed by default - i.e. the public instance of the component, which is retrieved via template refs or $parent chains, will not expose any of the bindings declared inside script setup.
To explicitly expose properties in a script setup component, use the defineExpose compiler macro.
Other Resources
📕 Vue 3 Course: johnkomarnicki.gumroad.com/l/tqrmw
🤖 Website: johnkomarnicki.com
🐦 Twitter: twitter.com/john_komarnicki










