0
In this code, the function only works after being called twice.
ubernehmen = () => {
this.setState({wert: ((this.state.cor*208)+(this.state.letra*8)})
this.setState({werta: ((this.state.cor2*208)+(this.state.letra2*8)})
//nas funções abaixo o redux é usado
this.props.Spur0VarD({...this.state})
this.props.Spur0VarE({...this.state})
this.setState({ isModalVisible: false })
console.log(this.state.werta)
}
//eu chamo a função assim:
<TouchableOpacity onPress={this.ubernehmen}></TouchableOpacity>
If she’s taking too long to get sued, what could I do? I brought an example of the app, but this occurs several times by the app, but in certain places works normally, sometimes even this code works there.. is totally unpredictable.
– Itoh
Try trading the Touchableopacity for a Buttom by importing into the React-Native - import { Buttom } lib from 'React-Native'
– Murilo Krugner
I switched to Button, and the same behavior happens.. There are other related questions but the resolution is always very targeted, I tried to do with componentwillupdate, even being deprecated, which solved my problem but when I use in Modal it does not allow, and the application is centered in modals.
– Itoh