-
-
Save alexesDev/d9de9f3f39e98bef8ac09c255c865756 to your computer and use it in GitHub Desktop.
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
| fetch('http://...') | |
| .then(res => res.json()) | |
| .then(data => dispatch(autodux.actions.success(data))); |
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
| const json = res => res.json(); | |
| const success = data => dispatch(autodux.actions.success(data)); // <---- | |
| fetch('http://...') | |
| .then(json) | |
| .then(success); |
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
| const json = res => res.json(); | |
| const success = compose(dispatch, autodux.actions.success); // <---- | |
| fetch('http://...') | |
| .then(json) | |
| .then(success); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment