問題
Type of the default value for '〇〇' prop must be a function
というエラーが出た。
中身は以下のような感じ
sample.vue
<script>
export default {
props: {
〇〇: {
type: Array,
default: [],
},
},
}
</script>
解決法
defaultの部分を修正する!
sample.vue
<script>
export default {
props: {
〇〇: {
type: Array,
default: () => [],
},
},
}
</script>