2023.12.19
const inputRef = useRef<HTMLInputElement>(null); <input type="text" placeholder="Product Name" ref={inputRef}/>
useRef에 <HTMLInputElement>제네릭 타입을 넣어야 하고, 값에 null을 넣어야 함.
⇒ 이 함수가 최초로 실행될 때는 DOM에 존재하지 않기 때문에