Untitled

// Tai component GrandParent
import { computed } from 'vue'

export default {
  data() {
    return {
      messageData: 'hello!'
    }
  },
  provide() {
    return {
      // explicitly provide a computed property
      message: computed(() => this.messageData)
    }
  }
}
// tai component Child
export default {
  // object syntax is required
  // when declaring default values for injections
  inject: {
    messageChild: {
      from: 'message', // this is optional if using the same key for injection
      default: 'default value'
    },
    user: {
      // use a factory function for non-primitive values that are expensive
      // to create, or ones that should be unique per component instance.
      default: () => ({ name: 'John' })
    }
  }
}

Vue SFC Playground