react-native-shine-button
react-native-shine-button copied to clipboard
onChange returning wrong value
onChange is always returning false. Looked into the JS code,found this
_onChange = event => {
let value = false;
if (event.nativeEvent.value === "YES") value = true;
this.props.onChange && this.props.onChange(value);
this._shineButton.setNativeProps({ on: event.nativeEvent.value });
};
After debugging, I found out that event.nativeEvent.value
returns boolean 'true' or 'false' according to the action performed. But because of the above condition, value is always set to 'false'