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

provide/inject flow

Arrange the steps for using provide/inject:

Items to put in order

  • Ancestor: provide('key', value)
  • Descendant: use val in template
  • Descendant: const val = inject('key')

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