textinputmask react native format code example
Example: react native text-input-mask this.props.refInput
<View style={container}>
<Text>Focusing next input</Text>
<TextInput
value={this.state.name}
onChangeText={name => {
this.setState({
name
})
}}
onSubmitEditing={() => {
this._cpfRef.getElement().focus()
}}
placeholder='Name'
/>
<TextInputMask
ref={ref => this._cpfRef = ref}
type={'cpf'}
value={this.state.cpf}
onChangeText={text => {
this.setState({
cpf: text
})
}}
placeholder='Cpf'
/>
</View>