import React, {PureComponent, PropTypes} from 'react'; import autobind from 'autobind-decorator'; @autobind class General extends PureComponent { _handleUpdateSetting (e) { let value = e.target.type === 'checkbox' ? e.target.checked : e.target.value; if (e.target.type === 'number') { value = parseInt(value, 10); } this.props.updateSetting(e.target.name, value); } render () { const {settings} = this.props; return (