Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

State of provide/inject #5067

Closed
znck opened this issue Mar 2, 2017 · 4 comments
Closed

State of provide/inject #5067

znck opened this issue Mar 2, 2017 · 4 comments

Comments

@znck
Copy link
Member

znck commented Mar 2, 2017

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/

@Akryum
Copy link
Member

Akryum commented Mar 2, 2017

Provide an object with reactive data inside.

@znck
Copy link
Member Author

znck commented Mar 2, 2017

@Akryum Can you update the fiddle with an example?

I think we should add some examples in docs too.

@lifedever
Copy link

#5075

@lifedever
Copy link

#5229

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants