Irene Mercy
Irene Mercy

Reputation: 21

String Not Defined

I'm new in nuxt and Vue, I'm following a nuxt tutorial I downloaded but I'm getting an error of string not defined.

How can I solve this?

props: {
  title: {
    type: string,
    required: true
  },
  previewtext: {
    type: string,
    required: true

Upvotes: 2

Views: 1026

Answers (1)

Birante
Birante

Reputation: 709

Hello @Irene Mercy You must write your string like this "String" not this "string" refers to documentations .

props: {
 title: String,
 likes: Number,
 isPublished: Boolean,
 commentIds: Array,
 author: Object
}

https://fr.vuejs.org/v2/guide/components-props.html

Thanks.

Upvotes: 3

Related Questions