Skip to content

Feature: Explainer for how code submission works w/ promises/async/await #92

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

Open
terichadbourne opened this issue Nov 30, 2018 · 1 comment
Labels

Comments

@terichadbourne
Copy link
Member

To the novice or to someone who's been using JavaScript for a while but isn't yet up-to-speed with promises and async/await, it would be helpful for us to answer these questions:

  • Why didn't I have to use await before ipfs.dag.put() in one lesson but I do in another? (The answer has to do with the fact that ipfs.dag.put() and ipfs.dag.get() are actually returning promises, which we haven't mentioned anywhere, so to oversimplify, if you are going to need to do something with that value later, you need the await.)
  • What's going on with this big run aysnc function wrapped around the code I'm writing?
  • When you tell me to return something, do I add something inside of that run function or replace return run with return myThing?

We need to decide what form this should take and where it should live. Is it a lesson within the first workshop? Is it a separate page we link to from multiple workshops?

This is essentially JavaScript info, not IPFS info, so we don't want to consume too much space with it, but we need to acknowledge that it causes a bit of confusion as the user progresses through exercises.

cc @mikeal

@mikeal
Copy link
Member

mikeal commented Nov 30, 2018

We need some kind of explainer just about JavaScript and how we're using it in the lessons. It won't be too hard to write up but I'm mostly just worried about where to put it, the exercise area is starting to get cluttered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants