Last active
June 27, 2019 01:21
-
-
Save bluejava/9f0ec6914f5abbb94707c706af301a65 to your computer and use it in GitHub Desktop.
Example 3 for Medium Post
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getUser(name) { /* returns Promise of user object */ } | |
function getFavorites(user) { /* returns Promise of favorites array */ } | |
Zousan.evaluate( | |
{ name: "username", value: "glenn" }, | |
{ name: "user", value: getUser, deps: [ "username" ] }, | |
{ name: "favs", value: getFavorites, deps: [ "user" ] } | |
).then(function(ob) { | |
renderUserFavs(ob.user, ob.favs) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment