Question · Vue.js course · Module 7: Props & Events

Prop types

How do you specify a prop type in defineProps?

Answer options

  • defineProps(['message: string'])
  • props.type = 'String'
  • defineProps({ message: String })
  • You cannot specify a prop type

You can check the correct answer by solving this task in the CodeWorlds game.