Last active
August 11, 2016 20:34
-
-
Save kandros/74e079f52a9c00d24d4d7f0e29775fec to your computer and use it in GitHub Desktop.
testing the obvious
This file contains hidden or 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
| function fetchAllProjects() { | |
| return dispatch => { | |
| console.log('1') | |
| dispatch(xxx()) | |
| dispatch({ type: 'REQUEST_ALL_PROJECTS' }); | |
| console.log('2') | |
| ProjectsApi.getAllProjects() | |
| .then(projects => { | |
| dispatch({ type: 'SUCCESS_ALL_PROJECTS', projects: fromJS(projects) }); | |
| }) | |
| .catch(e => { | |
| dispatch({ type: 'FAILURE_ALL_PROJECTS' }); | |
| console.error(e); | |
| }); | |
| }; | |
| } | |
| function xxx() { | |
| return dispatch => { | |
| console.log('xxx'); | |
| dispatch(rrr()); | |
| dispatch(yyy()); | |
| dispatch(zzz()); | |
| }; | |
| } | |
| function yyy() { | |
| console.log('yyy'); | |
| return { type:' in yyy'} | |
| } | |
| function zzz() { | |
| return dispatch => { | |
| console.log('zzz') | |
| dispatch(rrr()) | |
| } | |
| } | |
| function rrr() { | |
| return dispatch => { | |
| console.log('rrr') | |
| dispatch(qqq()) | |
| } | |
| } | |
| function qqq() { | |
| console.log('qqq') | |
| return { type: 'in qqq'} | |
| } |
This file contains hidden or 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
| 1 | |
| xxx | |
| rrr | |
| qqq | |
| yyy | |
| zzz | |
| rrr | |
| qqq | |
| 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment