[Vuejs]-Declaring Reactive Properties (Adding component blocks dynamically from array push)

0👍

I think what you described should work just fine in case if you’ve imported and declared in

components: { ... }

all possible names which could be found in each contentBlock.blockComponent. Notice those components must have their name: <String> exactly the same as in your contentBlock.blockComponent. I can’t see in your example this prop for item from addQuoteBlock by the way.

You also provided link on documentation, but it’s about props, which works just fine in your example. Recheck section about dynamic components, maybe it will help: https://v2.vuejs.org/v2/guide/components.html#Dynamic-Components (notice links on fiddles)

One more thing to check: does your component in baseComponent.vue wrapped with some ? Component must have single root element. Component with v-for probably won’t go.

Leave a comment