Skip to content

Updating foundation-section for async/await #7721

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
wants to merge 7 commits into
base: dev-2.0
Choose a base branch
from

Conversation

perminder-17
Copy link
Contributor

@perminder-17 perminder-17 commented Apr 10, 2025

need to add more examples and polish minor docs

Testing still left

@perminder-17 perminder-17 marked this pull request as ready for review April 12, 2025 16:10
@perminder-17 perminder-17 changed the title WIP: updating foundation-section for async/await Updating foundation-section for async/await Apr 12, 2025
* `loadImage()`, `loadJSON()`, `loadSound()`, and so on. This allows you to:
* - load files in a more readable, top-to-bottom manner
* - decide when the assets are fully available before proceeding
* - avoid nested callbacks often referred to as "callback hell"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great and much needed documentation! Two notes here:

  1. I believe it would be best not to use the phrase "callback hell" here. This is because the people familiar with this term are not likely to be the majority of the documentation readers. Instead, spell out in 1 or 2 additional sentences: that nested callbacks require managing additional information and behavior, and lazy loading can be helpful but it also requires you to design your sketch around that.

  2. Please me sure to have a separate paragraph here of 1-3 sentences explaining that callbacks can still be used as they were before, since this has come up a few times in past Q&A

Thank you so much!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, i can update this ASAP. Thanks for the review @ksen0

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

Successfully merging this pull request may close these issues.

2 participants