Здесь проблема в том, что ваш this
находится вне области действия, this
здесь относится к области обратного вызова firebase. Вы можете утешить this
и проверить.
const db = firebase.database().ref('users/trainers/'+uid).on('value', function(snapshot){
// here this refers to the firebase callback scope
this.setState({
.........
.........
})
}))
Исправление, которое вы можете сделать, это
const that = this;
const db = firebase.database().ref('users/trainers/'+uid).on('value', function(snapshot){
// now `that` holds your class LogPro1 scope, now you can setState using that.setState()
that.setState({
.........
.........
})
}))