Skip to content
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

chore(docs): add github fetch example to demo #20

Merged
merged 2 commits into from
Oct 24, 2021

Conversation

runningdeveloper
Copy link
Contributor

Description

Added a fetch example to the demo site. Type github mkrl and it returns Mikhail Korolev has 42 public repos.
If you prefer me to do it with async await I can adjust it.

I'm not sure what to put in the feature list. Maybe something like"Block user input while you do an operation, like fetch data". We could make the clickable command be to your profile or some big org like github mozilla

Based on #13

Pre-review checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation (if required)
  • My contribution is awesome

preview/main.ts Outdated
} else {
print('We got an error talking to Github')
}
stop()
Copy link
Owner

@mkrl mkrl Oct 23, 2021

Choose a reason for hiding this comment

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

Nice! Looks good, but I would say instead of calling stop() in both then and catch, it can be changed to just be called once in finally.

@mkrl mkrl self-assigned this Oct 23, 2021
Copy link
Owner

@mkrl mkrl left a comment

Choose a reason for hiding this comment

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

Nice job! It's a good example of wrapping an async action into user-blocking 'start/stop'.

@mkrl mkrl merged commit 3470d2b into mkrl:master Oct 24, 2021
@github-actions
Copy link

🎉 This PR is included in version 1.0.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

@mkrl mkrl added the docs label Oct 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants