For example for my api call I got this function
async function signUp(params) {
await api..call
}
then In my component I call this form submit function
const submit = async (info) => {
}
should I still call it as await.signUp(info) inside the submit function or await is not needed here because the original function is async / await? How should this look properly? Maybe async await is not needed anymore if the signUp function is async?
Via Active questions tagged javascript - Stack Overflow https://ift.tt/2FdjaAW
Comments
Post a Comment