react-hook-form: handleSubmit is not a function

I want to use react-hook-form to handle input from the user. React gives me an error saying “handleSubmit is not a function”. Any help would be appreciated.

My code is as followed (react-hook-form 7.13.0)

import { useForm } from "react-hook-form";
import axios from "axios";
import styled from "styled-components";

const Style = styled.div`
    .form {
        width: 200px;
        display: flex;
        flex-direction: column;

const Add = (props) => {
    const { register , handleSubmit } = useForm();

    const onSubmit = (e, data) => {

    const addReview = (data) => {
        axios.POST("http://localhost:3000/reviews", data).then(() => {
            props.setReviews([, {data}])
    return (
            <h3>Add a review</h3>
            <form className="form" onSubmit={handleSubmit(onSubmit)}>
                <input type="text" placeholder="Book Title" ref={register}></input>
                <input type="text" placeholder="Rating" ref={register}></input>
                <input type="text" placeholder="Review" ref={register}></input>
                <input type="submit" placeholder="Review"></input>

export default Add;


Pass this for every input with the name in order to register: