react-hook-form: Can't find variable: name in RN

Describe the bug Can't find variable: name on upgrding version to 3.28.3, It was working fine with 3.27.0

Any changes in API. My Inputs are also configured with Yup schema for validations

Screenshots image

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 3
  • Comments: 16 (9 by maintainers)

Commits related to this issue

Most upvoted comments

import { TextField } from 'react-native-material-textfield';
import useForm from 'react-hook-form';
  const { register, setValue, handleSubmit, errors } = useForm({
    defaultValues: {
      email,
      password,
    },
  });
<TextField
          testID="email"
          value={email}
          label="Email"
          lineWidth={0}
          keyboardType="email-address"
          autoCapitalize="none"
          containerStyle={styles.input}
          inputContainerStyle={styles.inputContainer}
          titleTextStyle={styles.inputTitle}
          labelOffset={{ y0: -6 }}
          tintColor="#231f20"
          returnKeyType="next"
          textContentType="username"
          autoCompleteType="username"
          ref={register({ name: 'email' }, { required: true })}
          onChangeText={text => setValue('email', text, true)}
          error={errors.email && 'Please enter your email'}
        />