Provide and Inject reactive not working for all descendants
protiumx opened this issue · 0 comments
protiumx commented
Describe the bug
I'm trying to provide a reactive field from one component to it's child descendant by 3 levels (child of a child of a child).
But inject[ __reactiveInject__]
is always empty. It seems to work only for immediate descendants.
Any way to get this working for all descendants as in the regular @Inject
?
To Reproduce
- use
@ProvideReactive
in one component - use
@InjectReactive
in a child of a child component`
Expected behavior
- The injected property should have the value fo the provided prop
Additional context
For now I solve it by providing a function that returns the desired field
@Provide
text() { return this._text }
------------------
@Inject('text')
_text;
get text() { return this._text(); }