jeudi 19 août 2021

Function undefined when console log

why function Input() is undefined? I am trying to create a second function to include to the onClick render but don't understand why it is not working.

Any suggestion?

Thanks

const [disabled, setDisabled] = useState(true);

function input() {
  (disabled === disabled) ? setDisabled(!disabled) : '';
}
const handleClickEditMember = () => {
  Actions.enableMemberEdit();
  console.log(input(),'test');
};

Aucun commentaire:

Enregistrer un commentaire