<whatever-compo /> VS <component /> performance ? #12153
Unanswered
Namidas
asked this question in
Help/Questions
Replies: 1 comment 1 reply
-
<FooComp />
<component :is="hasSth ? FooComp : BarComp" /> |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Probably this has been asked before (couldn't find anything though), what about the performance of
<component>
VS the component itself ?I just read the documentation and it's pretty clear (I would say):
Does this mean that if I make the biggest most robust app ever, and every single component (on template) is
<component :is="'my-compo'" />
instead of...
<my-compo />
...it'll all be the same performance-wise? (except, of course for loosing let's say a processor microtic while compiling the template because it checks the "is" prop instead of taking the compo name from tag name)
And what if instead of passing a string to the "is" prop I were to use a reactive ?
Essentially, I'm trying to provide a theme-like approach where you can "extend" (change) just any "core" compo (not just styles), I've already done this (don't know how to test performance though) but with just 2 or 3 "main" compos, and was wondering how far down that rabbit hole can I go before everything comes crashing down.
Based on what the docs say, there should be no difference in doing just anything only using
<component>
...but, you never know, maybe vüe3 devs can shed some light on this ?Thanks in advance =3
Beta Was this translation helpful? Give feedback.
All reactions