-
-
Save andresmijares/10b26a5b5bc148527bbf026cfd548d37 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class FirebaseService () { | |
/* info omitted for convinience */ | |
_sendPushNotification (id, order) { /*...*/ } | |
create (order) { | |
let {id} = order | |
this.__sendPushNotification(id, order) | |
} | |
} | |
class PouchDB () { | |
/* info omitted for convinience */ | |
create (store, order) { | |
/* triggers and action */ | |
store.dispatch({ | |
type: 'ORDER_CREATE', | |
payload: order, | |
}) | |
} | |
} | |
class MixPanelService () { | |
/* info omitted for convinience */ | |
create () { /* logs to the create event on mixpanel */ } | |
} | |
/* they all are singletons */ | |
export let firebaseService = new FirebaseService() | |
export let pouchDBService = new PouchDB() | |
export let mixpanelService = new MixPanelService() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment