-=Camille=-
Component that can render a different tag depending on prop?
Okay, thanks for the feedback! You are right, I also thought that I would have to put warnings for future devs that component would not react to changes to the
as
prop. It's probably too much risk for a low impact on the website's performance. Thanks for the help 🙂14 replies
Component that can render a different tag depending on prop?
Okay thanks. I'm just wondering if using a Dynamic component to just return a different header depending on the prop is a bad idea, since I actually don't need dynamism.
Should I just use the prop outside a reactive context to improve the performance? I guess I would lose reactivity, but gain performance by removing the reactivity checks.
I know I would not notice any significant difference, but I would like my code and websites to have the least performance impact as possible. I'm striving for eco-friendliness. 😄
14 replies
Component that can render a different tag depending on prop?
Is this because it's cleaner and Switch and Dynamic have the same impact? I'm just wondering if the Dynamic component has a bigger impact. The reason is that this Title will be used everywhere in my website, and I would rather not impact the performance too much. 😓
14 replies