I am receiving an error when trying to autoCapitalize. If I remove it, the component renders, but auto capitalize is on by default in ios (not android though). I want to add the property to ensure consistency.
This is the error (I removed the full listing of properties in order to condense)
"autoCapitalize" is not a valid style property  StyleSheet loginActionText: {
     "color": "#000",
      "fontSize": 20,
      "autoCapitalize": "none"
    }
    Valid style props: [
      "alignContent",
      "alignItems", 
      . 
      . 
      .
      "width",
      "writingDirection",
      "zIndex"
    ]
My code is really straight forward. I have defined a style class
 loginActionText: {
    color: '#000',
    fontSize: 20,
    autocapitalize: 'none'
  },
and then I am applying it to a Text Input
<TextInput style={styles.loginActionText}
  label='Email Address'
  placeholder='[email protected]'
  value={this.state.email}
  onChangeText={email => this.setState({ email })}
/>
autoCapitalize should be used this way:
<TextInput
    ...
    autoCapitalize='none'
    ...
/>
instead of being a property of the style object
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With