react-native-flip-toggle-button
react-native-flip-toggle-button copied to clipboard
[exception] toValue is not defined
"react-native-flip-toggle-button": "^1.0.8",
toValue is not defined.
solved: 1. constructor(props) { ... let toValue = 0; <---- add defined if (this.props.value) { toValue = toValue = this.dimensions.buttonWidth - this.dimensions.translateX; } else { toValue = 0; } ... }
componentDidUpdate(prevProps) { ... let toValue = 0; <---- add defined if (currentProps.value) { toValue = toValue = this.dimensions.buttonWidth - this.dimensions.translateX; } else { toValue = 0; } ... }
please update
@almorak good catch! Thanks. I major upgrade is on the way, I'll resolve this in that. Also, could you also share the props that you used when you came across this exception?