You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 23, 2020. It is now read-only.
Currently, actions have to be called twice when used in other actions:
lookup: function(country) {
return this.setSelector(country)() // <-- this
.then(this.submit());
}
This is awful. We need to have something cleaner.
Possible solutions, by order of preference:
Add a then property to action wrappers, so that it becomes transparent. See branch experimental-no-double-call.
Give all widgets a magic chain/start… property that returns an already-resolved promise and starts the chain. The main question is about the name itself.
The text was updated successfully, but these errors were encountered:
Implementation idea: make an external module that abstracts calling an array of promise-returning functions sequentially OR a promise-returning function, and use that in every instance where the user could provide a sequence of actions (custom actions in components, feature scenarios).
Allows both readability (use an array, get rid of return and then and their tricks) and extendability (use your own promise-returning function, up to you to ensure you don't forget proper return handling).
Currently, actions have to be called twice when used in other actions:
This is awful. We need to have something cleaner.
Possible solutions, by order of preference:
then
property to action wrappers, so that it becomes transparent. See branchexperimental-no-double-call
.chain
/start
… property that returns an already-resolved promise and starts the chain. The main question is about the name itself.The text was updated successfully, but these errors were encountered: