I try to add a number to a variable in the databas when the AppState is inactive and I do not know what to do
AppState.addEventListener('change', () => this.handleAppStateChange())
handleAppStateChange(){
if(AppState.currentState === 'inactive'){
addIncome().then().catch(error => {})
}
}