DEV Community

Mohan Mogi
Mohan Mogi

Posted on

useRef Hook

useRef Hook:
useRef is a React Hook.Access and manipulate DOM elements directly.
Store values without causing a component re-render.

Syntax:
import { useRef } from "react";

function App() {
const inputRef = useRef(null);

return ;
}

output:

Top comments (0)