LoginSignup
0
0

More than 1 year has passed since last update.

Type of the default value for '〇〇' prop must be a function

Posted at

問題

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>
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0