Skip to content

Can we add components or plugins after app is mounted? #12270

Discussion options

You must be logged in to vote

You shouldn’t do this! Registering components or plugins after app.mount can lead to hidden dependencies and subtle reactivity issues, plus other complexities within Vue’s ecosystem.

Instead, use v-if for conditional rendering or lazy-load components (defineAsyncComponent) as needed. These approaches avoid the pitfalls of async registration.

Hope that helps!

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@AlexandrosDa007
Comment options

Answer selected by AlexandrosDa007
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants