import React, { useState } from "react"; import ReactDOM from "react-dom"; import useForm from "react-hook-form"; import Input from "@material-ui/core/Input"; import Select from "react-select"; import "./index.css"; const options = [ { value: "chocolate", label: "Chocolate" }, { value: "strawberry", label: "Strawberry" }, { value: "vanilla", label: "Vanilla" } ]; const MyInput = ({ name, label, register }) => { return ( <> > ); }; function App() { const { register, handleSubmit, setValue } = useForm(); const onSubmit = data => { alert(JSON.stringify(data, null)); }; const [values, setReactSelect] = useState({ selectedOption: [] }); const handleMultiChange = selectedOption => { setValue("reactSelect", selectedOption); setReactSelect({ selectedOption }); }; return (