Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- state = state.merge(Immutable.fromJS({
- transactions: {
- list: [],
- byDate: {}
- }
- }))
- let cursor = Cursor.from(state, ['transactions'], newData => {
- notifyObservers(cursor);
- });
- /// ....
- getTransactions: function(month, year) {
- if (month != null && year != null) {
- return cursor.get('byDate').get(dateKey(month, year)).valueOf() ||
- Immutable.List();
- }
- return cursor.get('list').valueOf();
- },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement