Put in order · Vue.js course · Module 7: Props & Events

v-model implementation

Arrange the steps for implementing v-model in a component:

Items to put in order

  • defineProps(['modelValue'])
  • emit('update:modelValue', newVal)
  • defineEmits(['update:modelValue'])

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