Search code examples
javascriptvue.jsvuejs2vue-dynamic-components

Vue dynamic component renders twice


I'm rendering dynamic components inside a dashboard parent item. If there's a component, it renders. If there's not, well... then it doesn't. The problem is that my only dynamic component for now is being rendered twice.

I've tried rendering conditionally, etc, but nothing works.

I'm going to post some code here but you I'm working on a Sandbox, so maybe that's better.

No console errors, just a couple warnings. Any ideas?


Solution

  • https://codesandbox.io/s/01m594v78l

    You have two <slot></slot> tags in DashboardItem.vue. Remove one ;)