How to add multiple data types for VueJs Props?

Harsha Sampath picture Harsha Sampath · Dec 4, 2018 · Viewed 26k times · Source

This error got me when passing different values to the component.

enter image description here

Answer

Harsha Sampath picture Harsha Sampath · Dec 4, 2018

Here is the solution I found.

props: {
   value: [Number, String, Array]
}