issue: code.split is not a function. (In 'code.split("")','code.split' is undefined)
<OTPInputView style={{ width: '100%', height: 50, alignSelf: 'center', marginBottom: 20, }} pinCount={6} code={(this.state.code)} //You can supply this prop or not. The component will be used as a controlled / uncontrolled component respectively. onCodeChanged = {code =>{ if (code.length === 6) { { this.setState({code},()=>{ console.log('codeotp',this.state.code); })}}}} autoFocusOnLoad={false} keyboardType="number-pad" codeInputFieldStyle={{ width: 32, height: 45, borderWidth: 2, alignSelf: 'center', borderRadius: 5, color: color.secondarycolor, }} codeInputHighlightStyle={{ borderColor: color.secondarycolor,
}}
onCodeFilled={code => {

console.log(`Code is ${code}, you are good to go!`);
}}
// placeholderTextColor={{color:color.primarycolor}}
/>``
I'm getting this, issue when I want to pass default value to otp , I need to add default value for getting autofill otp by hash code sms
@KrushnaNaghate
You can use a fork without this problem and with better maintainability
https://github.com/retyui/react-native-confirmation-code-field