Last active
June 13, 2021 19:14
-
-
Save hpierre74/c3346f5bca1d8977f50d1142b20dc15b 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 const createUser = ({ username, password }) => async (dispatch, getState) => { | |
await fetch('/api/user', { method: 'POST', body: JSON.stringify({ username, password }) }; | |
return dispatch({ type: 'CREATED_USER', payload: { username } }); | |
}; | |
export const addUserProfile = profileId => ({ type: 'ADDED_USER_PROFILE', payload: { profileId } }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment