Comments (12)
Hi π
I'm gunna try to make a PR for this tonight. Sound good?
from hoodie-client.
Sounds amazing :) All yours
from hoodie-client.
Hey @danreeves whatβs status?
from hoodie-client.
Hi @gr2m, finally had some time to look at this tonight. I've had some issues getting hoodie@next and hoodie-client working together but that's maybe another issue. I've made a WIP PR here: #32
Looking like the right direction?
from hoodie-client.
Awesome I'll check it out tomorrow, thanks a ton!
from hoodie-client.
@gr2m I am not guru in api design, but options.promise = options.promise.then
looks ugly for me. can't we just return promise and manage it from callback caller instead?
from hoodie-client.
Yeah Iβm wondering if there is a nicer API :) But the one with options.promise
is the best shot right now, as we canβt get the value that is returned by event handlers
hoodie.on('reset', function () {
return new Promise(...) // this goes nowhere
})
hoodie.trigger('reset')
from hoodie-client.
@Guria hereβs an alternative API suggestion to intercept things like reset
events: #42
from hoodie-client.
@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 options.promise = options.promise.then
didn't appear to be working as expected
from hoodie-client.
@danreeves clever!!
from hoodie-client.
@danreeves letβs put hoodie.reset
on hold for now. We have to think about the hooks as we need it for the glue code between hoodie.store
and hoodie.account
, but hoodie.reset
only becomes relevant with plugins which we put out of scope for the first release. I like your options.hooks
idea, maybe we can use that implementation for the hooks in sign in / sign out
from hoodie-client.
Yeah, that makes sense
from hoodie-client.
Related Issues (20)
- An in-range update of uglify-js is breaking the build π¨ HOT 1
- π― test coverage HOT 1
- An in-range update of uglify-js is breaking the build π¨ HOT 1
- after reconnecting, store does not resume sync HOT 6
- An in-range update of browserify is breaking the build π¨ HOT 2
- Package hoodie-client for Bower HOT 7
- hoodie.account options are not applied HOT 4
- 'change' event no longer triggered after sign in / sign out HOT 1
- Compacting PouchDB HOT 3
- pass options to plugins
- An in-range update of pouchdb-adapter-http is breaking the build π¨ HOT 4
- An in-range update of pouchdb-adapter-memory is breaking the build π¨ HOT 4
- An in-range update of pouchdb-core is breaking the build π¨ HOT 4
- An in-range update of pouchdb-replication is breaking the build π¨ HOT 4
- Arguments ignored in custom events HOT 2
- An in-range update of @hoodie/store-client is breaking the build π¨ HOT 2
- An in-range update of uglify-js is breaking the build π¨ HOT 14
- Project still alive? HOT 5
- Offline multi-user authentication HOT 5
- Option to set database name respectively split data into multiple databases HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hoodie-client.