-
Notifications
You must be signed in to change notification settings - Fork 25
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
Implement hoodie.reset() #12
Comments
Hi 👋 I'm gunna try to make a PR for this tonight. Sound good? |
Sounds amazing :) All yours |
Hey @danreeves what’s status? |
Awesome I'll check it out tomorrow, thanks a ton! |
@gr2m I am not guru in api design, but |
Yeah I’m wondering if there is a nicer API :) But the one with hoodie.on('reset', function () {
return new Promise(...) // this goes nowhere
})
hoodie.trigger('reset') |
@gr2m looks similar to something I was working on to get the .reset() call to be thenable without racing the event listeners: danreeves@9ded20e edit: because |
@danreeves clever!! |
@danreeves let’s put |
Yeah, that makes sense |
Reset hoodie client and emit
reset
events so plugins can reset as well. Should implement a way so that plugins can hook into the reset with async operationsAnd plugins could do something like
^^ This is just a suggestion, maybe there are better patterns for it :)
The text was updated successfully, but these errors were encountered: