DEV Community

loading...

Discussion on: Using React Hook Form with react-native - Part I (set up & validation)

Collapse
tahaattari profile image
Taha • Edited

The post is really informative! It helped a lot, thank you for writing it! One small change I would recommend:

      <TextInput
        {...props}
        style={[styles.input, props.error && t.borderRed500, props.style]}
      />
Enter fullscreen mode Exit fullscreen mode

instead of

      <TextInput
        style={[styles.input, props.error && t.borderRed500, props.style]}
        {...props}
      />
Enter fullscreen mode Exit fullscreen mode

so that the custom error style can't be overwritten during implementation