'Why Formik handleBlur doesn't run two functions?
After user types the name, I check for its uniqueness in handleBlur. The check runs fine, but the warnings from yup are not showing on blur. Thus handleBlur('name') is not running:
// onBlur={handleBlur('name')} // This runs fine!
onBlur={async () => {
const isUnique = await checkUserNameUniqueness(values.name);
if (!isUnique) userNameIsNotUnique();
handleBlur('name');
}}
I tried to run it without sync/await but nothing.
Is there a way to fix that?
As I see here there is a way to run two functions in onChange
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
