MCPcopy Create free account
hub / github.com/react-hook-form/react-hook-form / MyInput

Function MyInput

examples/V7/customInput.tsx:14–27  ·  view source on GitHub ↗
({ label, name, onChange, onBlur, ref })

Source from the content-addressed store, hash-verified

12];
13
14const MyInput = ({ label, name, onChange, onBlur, ref }) => {
15 return (
16 <>
17 <label htmlFor={name}>{label}</label>
18 <input
19 name={name}
20 placeholder="Jane"
21 onChange={onChange}
22 onBlur={onBlur}
23 ref={ref}
24 />
25 </>
26 );
27};
28
29export default function App() {
30 const { register, handleSubmit, setValue } = useForm();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected