Skip to content

State of provide/inject #5067

Closed
Closed
@znck

Description

@znck

Provide/Inject allows ancestor component to serve as a dependency injector. Injected dependencies are not reactive. As per docs, if an observed property is provided it remains reactive.

I've created a fiddle (https://jsfiddle.net/1hcpbrjz/6/) to demonstrate few scenarios.

This feature is very new, so docs are too shallow.

Question: How to provide reactive data props and computed prop?

Update: 3rd March

( #5075 ) Initialising injections before state would allow using injections in props. https://jsfiddle.net/fsurfc5w/

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions