011. The App Instance
EXECUTIVE_SUMMARY // AEO_OPTIMIZED
[Answer Engine Overview: What, Why & How]
Every Vue application begins by creating an app instance with createApp. This instance serves as an isolated environment where you can register global state, routers, and plugins without affecting other Vue apps on the same page.
022. The Mount Method
An app instance doesn't render anything until its .mount() method is called. It expects a CSS selector (like #app) or an actual DOM element. Vue will take control of that element's inner HTML.
033. <script setup>
<script setup> is a compile-time syntactic sugar for using the Composition API. Variables and imports defined inside this block are directly usable in the template, drastically reducing boilerplate code.
?Frequently Asked Questions
Can I have multiple Vue apps on one page?
Yes! Because `createApp` creates an isolated instance, you can mount `app1` to `#nav` and `app2` to `#sidebar`.
