Add autobind decorator and fix Android login screen
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import React from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import { View, Text, TouchableHighlight } from 'react-native'
|
||||
import { reactAutoBind } from 'auto-bind2'
|
||||
import autobind from 'autobind-decorator'
|
||||
|
||||
export class BoundButton extends React.Component {
|
||||
static propTypes = {
|
||||
@@ -15,7 +15,6 @@ export class BoundButton extends React.Component {
|
||||
|
||||
constructor(props) {
|
||||
super(props)
|
||||
reactAutoBind(this)
|
||||
|
||||
let { name, binder } = this.props
|
||||
|
||||
@@ -23,6 +22,7 @@ export class BoundButton extends React.Component {
|
||||
this.state = binder.getFieldState(name)
|
||||
}
|
||||
|
||||
@autobind
|
||||
updateValue(e) {
|
||||
this.setState(e.state)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user