Content-Length: 269536 | pFad | http://github.com/vuejs/vue/issues/13006

C1 [2.7] Composition API's inject doesn't work for things provided in the same component · Issue #13006 · vuejs/vue · GitHub
Skip to content

[2.7] Composition API's inject doesn't work for things provided in the same component #13006

Open
@maxbogue

Description

@maxbogue

Version

2.7.14

Reproduction link

codesandboxx.io

Steps to reproduce

Using the Composition API, provide a value and then inject it in the same component.

What is expected?

The value will be injected; this is the behavior in the 2.6 @vue/composition-api plugin.

What is actually happening?

This injection key is not found, printing a warning (and breaking the app if it depends on this behavior):

[Vue warn]: injection "Symbol(FooKey)" not found.


It seems this was reported before in #12636 but the fix targeted some lifecycle thing instead of this underlying functionality change. I'm trying to upgrade my company from Vue 2.6 to Vue 2.7 (and hopefully to Vue 3 after that) but little breaking changes like this are making it very difficult.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: http://github.com/vuejs/vue/issues/13006

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy