//export store onSnapshot(store, snapshot => { let nextStore = toJS(snapshot); ElectronStore.store = exportStore(nextStore); });
proc = childProcess.spawn(self.command, toJS(self.argz), { cwd: self.path, shell: true,
toJS() { return toJS(this); }
getColumnsWidth() { return toJS(this.columns) .filter(c => (c.show !== false)) .map(c => c.width); }
constructor(){ this.cartItems.intercept((change) => { if(change.removedCount > 0){ return change; } var idSet = new Set(toJS(this.cartItems).map(c => c.id)); if(idSet.has(change.added[0].id)) { // prevent adding same item multiple times console.log('>> CartStore > intercept > Adding same item multiple times is not allowed'); return null; } return change }); }
render() { return ( <ListView refreshControl={ <RefreshControl refreshing={this.state.refreshing} onRefresh={this._onRefresh} /> } style={styles.container} dataSource={this.ds.cloneWithRowsAndSections(toJS(profileStore.friendList))} renderSectionHeader={this._renderSectionHeader} renderSeparator={this._renderSeparator} renderRow={this._renderRow} enableEmptySections={true} /> ); }
@computed get count_list() { let list = toJS(this.list) return list.length }
toJson() { return { user: toJS(this.user), } }
@computed get get_games() { // toJs is going to convert the list of games which is an observable to a js Array let games = toJS(this.games) return games }
@computed get get_list() { let list = toJS(this.list) return list }
toJS() { return toJS(this); }