Advertisement
Guest User

Untitled

a guest
Jan 27th, 2015
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. state = state.merge(Immutable.fromJS({
  2. transactions: {
  3. list: [],
  4. byDate: {}
  5. }
  6. }))
  7. let cursor = Cursor.from(state, ['transactions'], newData => {
  8. notifyObservers(cursor);
  9. });
  10.  
  11.  
  12. /// ....
  13.  
  14. getTransactions: function(month, year) {
  15. if (month != null && year != null) {
  16. return cursor.get('byDate').get(dateKey(month, year)).valueOf() ||
  17. Immutable.List();
  18. }
  19. return cursor.get('list').valueOf();
  20. },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement