-
Notifications
You must be signed in to change notification settings - Fork 10
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
Suggest using promises instead of callbacks #1
Comments
Yep - Noted. I'm working on it. |
Does https://github.com/jakearchibald/idb suffice? |
Looks interesting - I'll give it a whirl. |
I'm having a shot at that - but (especially on firefox) I'm finding that it isn't easy to work around the fact that promises aren't microtasks - so ideally I'd do a I'm still experimenting, but would welcome feedback. |
Ah - not tried FF in a while. I'll have to have a play and see what I find. |
I find callbacks become unwieldy when more than a couple are nested, so I'd be tempted to wrap methods in promises. e.g.
With the equivalent calling code reading:
The text was updated successfully, but these errors were encountered: