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, Switch, Text } from 'react-native'
|
||||
import { reactAutoBind } from 'auto-bind2'
|
||||
import autobind from 'autobind-decorator'
|
||||
|
||||
export class BoundSwitch extends React.Component {
|
||||
static propTypes = {
|
||||
@@ -12,10 +12,10 @@ export class BoundSwitch extends React.Component {
|
||||
|
||||
constructor(props) {
|
||||
super(props)
|
||||
reactAutoBind(this)
|
||||
this.state = props.binder.getFieldState(props.name)
|
||||
}
|
||||
|
||||
@autobind
|
||||
handleValueChange() {
|
||||
const { binder, name } = this.props
|
||||
const state = binder.getFieldState(name)
|
||||
|
||||
Reference in New Issue
Block a user