defineExpose and useAttrs
Exposing component internals with defineExpose(), useAttrs() for fallthrough attributes.
Exposing and Forwarding
Two more tools round out component communication: defineExpose lets a parent reach into a child, and useAttrs gives you the leftover attributes the parent passed. Both are common in reusable components.
Components Are Closed by Default
With <script setup>, nothing inside the component is accessible from a parent template ref. This encapsulation is good, but sometimes a parent legitimately needs to call a child method.