I have experiance in iOS native development and I am now trying to build my first app on react-native.

I am trying to setSate when I receive data from firebase database as bellow:

```
state = {
remainingSeconds: 5,
dataArray: [],
};

componentDidMount() {
// Get data from firebase
this.getData(); 
}

getData() {
// Set the configuration for your app
var config = {
  apiKey: "XXXXXX",
  authDomain: "XXXXXXX",
  databaseURL:  "XXXXXXX",
  storageBucket: ""
};
firebase.initializeApp(config);

// Get a reference to the database service
var database = firebase.database();

// Get data
var usersRef = firebase.database().ref('Users');
usersRef.on('value', function(snapshot) {

  this.setState({
    dataArray: snapshot.val()
  })
});
};

```

I get the following error:

[![enter image description here](https://i.stack.imgur.com/BiYhY.png)](https://i.stack.imgur.com/BiYhY.png)

any one can help about that?

Thank you in advanced.