Need helps with new NextJS <Form> component!
Answered
sh1ro posted this in #help-forum
sh1roOP
How can I pass my
ref
attribute to the <Form>
component? It just keeps showing a TypeScript error.3 Replies
@sh1ro How can I pass my `ref` attribute to the `<Form>` component? It just keeps showing a TypeScript error.
const ref = useRef<HTMLFormElement>(null);
<Form ref={ref}>
Answer
@joulev ts
const ref = useRef<HTMLFormElement>(null);
<Form ref={ref}>
sh1roOP
Oh thanks, I forgot it was TypeScript not vanilla JS.
Iām currently using a phone. How can I close the post?