Exposing Parts Of Your Vue Component? @JohnKomarnicki
Exposing Parts Of Your Vue Component?  @JohnKomarnicki
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
Exposing Parts Of Your Vue Component?Vue 3 Reactive Data | Ref Vs Reactive in 10 Minutes! (ish)The Perfect Backend? | Getting Started With Neon & NuxtShould You Use Vue Slots Over Props?useFetch() custom payloads | Nuxt Data FetchingAdd Vue 3 State To Your CSS With V-Bind()Are you storing your Vue assets correctly?The new way to add authentication to your app?Build A Recipe Application With Nuxt & Tailwind CSS (Nuxt Crash Course 2025)The Better Way To Add Icons To Your ApplicationsHandle JavaScript Promises Like A Pro!Lazy loading with useFetch() | Nuxt Data Fetching
John Komarnicki |

Exposing Parts Of Your Vue Component?

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER