[Vuejs]-Component within a component, or both components under a parent component?

0👍

Well, I would said the one who suits the most to you and seems more maintenable.

Anyway, we have to keep in mind here that the edit-dialog mode is a overlayed modal of your webpage which is listing item-views. At this point, first solution isn’t the good one for me, because the components edit-dialog would be repeated for each ItemView components, which is pointless because (I guess) we can’t open more than one modal at the same time.

The second one is more suitable I think, and since the parent component is a kind of ItemWrapper / Manager, I don’t see any problem to handle some event logic in here. Using an EventBus for this kind of feature that concerns two nearby UI components seems to me a bit exagerated.

On the performance side, I will let someone more experimented than me talk about it. Hope it helps.

Leave a comment