-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Aproveitando sua propria sugestão nesta função, podemos dar uma melhorada nela:
const validateInput = ({ target }) => {
if (target.value.length > 2) {
return button.removeAttribute('disabled');
}
button.setAttribute('disabled', '');
}
Lembrando que o nome que a gente da para isso se chama Early return, sugiro pesquisar sobre isso para se familiarizar com este comportamento.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels