Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
axios post in reactJS using redux-sagas
function* sendLandingPageEmail() {
const Email = yield select(email());
console.log("email")
const url = "https://tokenlab.io/projection/create";
const Edata = {
email: Email,
}
console.log(Edata)
try {
yield call(axios.post.bind(axios, url), Edata);
yield put(sendEmailSuccess());
} catch (err) {
console.log(err);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment