set length limit text input react native code example Example: react native elements input limit <TextInput value={this.state.text} maxLength={4} />