Skip to content

Instantly share code, notes, and snippets.

@jmaguirrei
Last active June 21, 2018 23:06
Show Gist options
  • Save jmaguirrei/3bab0fcddc74a00329c4859c96ca22b0 to your computer and use it in GitHub Desktop.
Save jmaguirrei/3bab0fcddc74a00329c4859c96ca22b0 to your computer and use it in GitHub Desktop.
Meetings Store with explicit MobX
import { computed } from 'mobx';
import { StoreClass } from '/common/classes/';
import { myMeetings } from './extends/myMeetings';
import { myMeeting } from './sets';
export default class Store extends StoreClass {
constructor(Stores) {
super('MeetingsStore', Stores);
}
@computed get myMeetings() {
if (!this.ready) return false;
return myMeetings({
meetings: this.dbData,
meeting_id: this.State['App_meeting_id'],
});
}
@computed get myMeeting() {
if (!this.myMeetings) return false;
return myMeeting({
meetings: this.myMeetings,
meeting_id: this.State['App_meeting_id'],
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment