Skip to content

Injections resolve differently for functional components #7490

@OEvgeny

Description

@OEvgeny

Version

2.5.13

Reproduction link

https://jsfiddle.net/ts7c6s1w/2/

Steps to reproduce

  1. Open repro link
  2. Verify component tree has the component which provides val
  3. Verify that there are two components which inject val
  4. Verify the output

What is expected?

Both the injector and the func-injector receive provided val.

What is actually happening?

Only injector receives provided val.


I didn't found any information about such behavior in docs. Looks like functional components resolve injections from functional context not parent component. Is it intended to work as it works now?

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