Replies: 1 comment
-
I decided to remove all exposed instances and only maintain the promises that resolved them. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Writing component tests I discovered that all exposed instances, I mean
mapInstance
,markerInstance
, etc, are alwaysundefined
.This happens because the instance variable is
undefined
in setup phase and it's only populated on themounted
hook.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.
undefined
if the Google component is not created, or the created instance.undefined
if 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 ·
Beta Was this translation helpful? Give feedback.
All reactions