react-native-flip-toggle-button icon indicating copy to clipboard operation
react-native-flip-toggle-button copied to clipboard

[exception] toValue is not defined

Open almorak opened this issue 5 years ago • 1 comments

"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 avatar Aug 12 '20 04:08 almorak

@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?

ashishpandey001 avatar Nov 30 '20 22:11 ashishpandey001