this.setstate is not a function in react native
constructor(props) {
super(props)
this.onClick = this.onClick.bind(this)
}
onClick () {
this.setState({...})
}
this.setstate is not a function in react native
constructor(props) {
super(props)
this.onClick = this.onClick.bind(this)
}
onClick () {
this.setState({...})
}
TypeError: this.setstate is not a function
Make sure you use arrow functions to correctly bind 'this'
handlePageChange = (page) => {
this.setState({ currentPage: page });
}
This will give you 'this.setstate is not a function'
handlePageChange(page){
this.setState({ currentPage: page });
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us