Created
July 12, 2020 22:47
-
-
Save narf200/c9eb12d21fc0a5b1eea816a607dfeb0e to your computer and use it in GitHub Desktop.
This file contains 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
export function setRepositories(username) { | |
return function (dispatch) { | |
fetch(`https://ap.github.com/users/${username}/repos`) | |
.then((r) => r.json()) | |
.then((list) => { | |
dispatch({ type: SET_REPOSITORIES, list }) | |
}) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment