-
Notifications
You must be signed in to change notification settings - Fork 17
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
Variable name continuity #338
Comments
resolve is much more accurate. Sometimes other getters might need these values. Those getters would not be able to be able to read the value in the promise synchronously (there is a way as of 4.0). |
@justinbmeyer Thanks. What is the alternative way for a getter awaiting a promise as of 4.0? |
This same technique works in 3.0. |
@justinbmeyer Your comment wasn't a response to me was it? |
It was. What are you looking for? Async getters go back a long way. |
Sorry, I think I probably have misunderstood you. In your first comment, all this is clear:
However, the meaning of this bit in parenthesis was not clear to me:
I assumed you meant that in 4.0, there exists a new or alternative pattern for a getter awaiting another getter's promise (other than the one discussed in the OP). That's why I followed up with:
You let me know the pattern in the OP works in 3.0 as well, but it still is not clear to me what was meant by "there is a way as of 4.0" in regards to being able to read the value in the promise synchronously. So, it's not clear to me what you were hinting at when you said:
And that's what I was expecting a reply about! So, what was meant by "there is a way as of 4.0"? Anyways, hopefully my misunderstanding here makes sense and you can help clear it up! Thanks. |
In 4.0 you could write: get(){ return canReflect.getKeyValue(this.promise,”value”) } |
That is pretty cool. Thanks |
It doesn't matter much, but I was wondering what is the more "correct" variable name for the second parameter of these get functions:
setVal
orresolve
? Also, it's not clear to me the purpose of this pattern; Is the purpose simply to avoid having{{#if promise.isResolved}}
checks in the stache?bitballs/public/components/tournament/details/details.js
Line 81 in 34dd301
bitballs/public/components/tournament/details/details.js
Line 104 in 34dd301
bitballs/public/components/tournament/details/details.js
Line 137 in 34dd301
bitballs/public/components/tournament/details/details.js
Line 217 in 34dd301
bitballs/public/components/tournament/details/details.js
Line 241 in 34dd301
The text was updated successfully, but these errors were encountered: