1👍
With the setup() hook you have to register the components you want to use like this:
export default {
components: {
Header,
IncomeList,
Form
},
props: { someProps },
setup(props) {
...
Alternatively you can use <script setup>
where you don’t have to register them like this: https://vuejs.org/api/sfc-script-setup.html
- [Vuejs]-Vue App ID causing issues with existing page 'addEventListener'
- [Vuejs]-How to target specific vue table element?
0👍
You need to register this IncomeItem as a component here for the VUE to understand it is a component.
Add following into your IncomeList.vue:
<script>
import IncomeItem from "./IncomeItem.vue";
export default {
props: {
state: Object
},
// add this below line as an component
components: { IncomeItem },
// above component. you need to register this IncomeItem as a component here for the VUE to understand it is a component.
setup() {
return {
IncomeItem
}
}
}
</script>
Source:stackexchange.com