Open SukumarSmart opened 5 years ago
@SukumarSmart First create a ref like below : this.otpCodeRef = React.CreateRef() <CodeInput ref={(value) => this.otpCodeRef = value} .... />
After reading the 4 digit OTP from the 3rd part module ( react-native-android-sms-listener ) const verificationCode = '' const tmp = [...verificationCode] this.otpCodeRef.setState({ codeArr: tmp, currentIndex: 3 })
@gsmohan Thanks for the answer
@SukumarSmart First create a ref like below : this.otpCodeRef = React.CreateRef() <CodeInput ref={(value) => this.otpCodeRef = value} .... />
After reading the 4 digit OTP from the 3rd part module ( react-native-android-sms-listener ) const verificationCode = ''
const tmp = [...verificationCode]
this.otpCodeRef.setState({ codeArr: tmp, currentIndex: 3 })