-
I have an element that is providing some async loaded data from an API. I have children inside the element consuming the context, which is working. I need my provider to also use the data being provided in the context, but it the property just comes back undefined?
Logging out the loaded user, its Is this correct? The documentation show adding |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
You need the flip the order of the decorators. export class UserView extends LitElement {
@provide({ context: userContext })
@property({ attribute: false })
user;
...
} |
Beta Was this translation helpful? Give feedback.
I filed it here #3806
Thanks for reporting and narrowing down the repro!
I'll try and take a look later to see if it might be a quick fix but since there is a workaround priority is not high.
Another workaround would be to use the
ContextProvider
reactive controller as well. The double decorator seems less desirable as a workaround as it feels like relying on buggy behavior to make the decorator work.