Vue2 options api
thebrownfox opened this issue · comments
Is it possible to use vue2 as below (no setup, ref or anything composition api related used, but good old options api)? Because I get InternalError: too much recursion
<template>
<PieChart :chart-data="data" :options="options" />
</template>
<script>
import { defineComponent } from "@vue/composition-api";
import { PieChart } from "vue-chart-3";
export default defineComponent({
components: { PieChart },
})
Yeah you can use option API. Can you make a reproduction on CodeSandbox? This must come from your code
@victorgarciaesgi yeah figured out it was my fault. Used it in nuxt with autoimport and there was conflict in naming. Usually /folder/PieChart
would be registered as <FolderPieChart/>
but when the same name was used inside the component (imported the PieChart and put it in components though and name wasn't set, but it must take precedence somehow), vue tried to used it recursively instead of the imported component -> infinite loop occurred.