I have a problem about how to print a value,in a function, in react-native.
Basically I have a function that research in the DB some values, and I should print this values.
findUtente(cf) {
let params = {};
console.log(cf)
params = {
"Person.FiscalCode": cf
};
global.utente.db.localdb().find({
selector: params
})
.then(response => {
let utente = response.docs[0];
console.log ("utente: " + utente)
utente.Person.FirstName;
console.log ("utente.Person.FirstName: " + utente.Person.FirstName)
})
//.... catch...}); }
render() {
{this.findUtente(this.props.cf)}
return (
<View style={style.container}>
<View style={style.page}>
<KeyboardAwareScrollView>
<Text style={visualProfilo.text}>Name:</Text>
<Text style={visualProfilo.text1}>{Stamp Here the FirstName}</Text>
The value in the console log is print in the right way. How can I print that value?
Thank you