Repository navigation
Replies: 1 comment
|
I decided to remove all exposed instances and only maintain the promises that resolved them. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Writing component tests I discovered that all exposed instances, I mean
mapInstance,markerInstance, etc, are alwaysundefined.This happens because the instance variable is
undefinedin setup phase and it's only populated on themountedhook.To get the assigned instance later we need to use a computed to reevaluate which is the content of the variable when you call it. This looks redundant for the following reasons.
undefinedif the Google component is not created, or the created instance.undefinedif the Google component is not created or the created instance.For these reasons, we think a better option could be to remove the exposed instance and only expose the promise that resolves it. But we would like to hear your opinions.
We'd appreciate if you could share with us your ideas or points of view about this change.
0 votes ·
All reactions