Advertisement
Guest User

Untitled

a guest
Jan 17th, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. parallel({
  2.             account: (next) => {
  3.                 AccountsService.getById(this.props.params.account_id).then( (response) => {
  4.                     next(null, response);
  5.                 });
  6.             },
  7.             departments: (next) => {
  8.                 DepartmentsService.get().then((response) => {
  9.                     next(null, response.departments);
  10.                 });
  11.             }
  12.         }, (error, new_state) => {
  13.             this.setState(new_state);
  14.         });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement