Answers for "useref in react typescrpt"

2

useref react typescript

const inputRef = React.useRef<HTMLInputElement | null>(null);
Posted by: Guest on April-01-2021
1

useref in react typescrpt

// create refernce for element
let refName= useState<HTMLDivElement>(null)
//usage
<div ref={refName} className=""></div>
// access in useEffect 
refName.current
Posted by: Guest on September-19-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language