I am new to react native and hooks. In my project I have declared two state properties and I want to get them inside a function. But I am not getting the value from the hook properties.In console it is writing [object object]
const Login =()=> {
const [username, setUserName] = React.useState('');
const [password, setPassword] = React.useState('');
callAPI = async ()=>{
console.log('api called :' + username)
}
}
setUserNamesomewhere?console.log(username);directly to be able to see what the object actually is.