Last active
June 21, 2018 23:06
-
-
Save jmaguirrei/3bab0fcddc74a00329c4859c96ca22b0 to your computer and use it in GitHub Desktop.
Meetings Store with explicit MobX
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
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