SnipZard
Search snippets
Home
Portfolio
Contact
useRef
The useRef hook allows you to persist values between renders without causing a re-render.
Snippet:
const
ref
=
useRef
(
initialValue
)
;
Copy Code
Example:
const
inputRef
=
useRef
(
null
)
;
Copy Code