You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Duped logic between a one-time reaction (promise) and continued reactions (observer), when really these are the same thing
Handshake issues when both getting and observing a path while it's in transit and filling the buffer
Growing number of observer methods that all do the same thing to different pieces of data (observe, observeState, observeQuery once we reimplement indexes)
// Get dataSimpla.get('/foo').subscribe(...,{once: true});// Observe data changesletfoo=Simpla.get('/foo').subscribe(...);// Stop an observerfoo.unsubscribe();
The text was updated successfully, but these errors were encountered:
Simpla currently uses promises and observer methods to react to data, eg:
This has a few problems:
Duped logic between a one-time reaction (promise) and continued reactions (observer), when really these are the same thing
Handshake issues when both getting and observing a path while it's in transit and filling the buffer
Growing number of observer methods that all do the same thing to different pieces of data (
observe
,observeState
,observeQuery
once we reimplement indexes)Instead, Simpla should return ES6 observables, using a library like RxJS or zen-observable.
The new API would look something like this
The text was updated successfully, but these errors were encountered: