adrianhajdin / project_e_commerce

This is a code repository for the corresponding video tutorial. In this video, we're going to build a fully functional eCommerce application using commerce.js.
https://jsmastery.pro
1.88k stars 507 forks source link

TypeError: Cannot read property 'current' of undefined #35

Open naveensuthi opened 3 years ago

naveensuthi commented 3 years ago

import React from "react"; import { InputLabel, Select, MenuItem, Button, Grid, Typography, } from "@material-ui/core";

import FormInput from "./CustomTextField";

import { useForm, FormProvider } from "react-hook-form";

const AddressForm = () => { const methods = useForm(); return ( <>

Shipping Address
  <FormProvider {...methods}>
    <form onSubmit="">
      <Grid container spacing={3}>
        <FormInput required name="firstName" label="First Name" />
      </Grid>
    </form>
  </FormProvider>
</>

); };

export default AddressForm;