-
Notifications
You must be signed in to change notification settings - Fork 23
Conversation
What am I looking at? Why is it wip? Also, why weren't you taking your break like you said you would :p ? |
hehe |
35cd572
to
fd2330b
Compare
i separated the two.test PR wip #63 |
note to self: see if async/await isn't easier ps: user'd need to install babell-polyfills. so, not the best option. |
fd2330b
to
a86a3da
Compare
@doktordirk Why the extra promise? API already returns a promise. |
had a reason 😄 need to have a look |
i remember now. there can be errors thrown in the top parts which i wanted to be able to handle in a .catch() (managed to get errors thrown in my first trails for tests) |
|
||
return repository.findPath(findPath, criteria); | ||
resolve(repository.findPath(findPath, criteria)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return in stead of resolve
Could you explain this PR to me again please? I still don't quite understand. |
first, i mainly did it to promises in components. thus it's mainly for your consideration. i wouldn't insist as there might be other options, or a no-problem in the first place components have no activate() and thus don't respect promises. so, when attached is called the promise coming from fetch might not be resolved or rejected yet. as described.in the links compositionTransaction is a way to make attached wait until the fetch promise is fulfilled |
@doktordirk What you're describing is by design. You never need the data to be populated instantly. Now, if you have 4 association-selects on the page, you have to wait, which is a bad UX. That's the reason it's in activate(). |
yeah, you have those observe something in there. i better have another look at the flow |
@doktordirk If you hit me up on gitter when you have time I can give you the "gist" |
i'll treat it as excercise |
wip