TS2322: Type 'HTMLDivElement | undefined' is not assignable to type 'HTMLDivElement | null'.

Lumpen·2022년 9월 5일

Error

목록 보기
1/44

useRef() 초기 값에 null을 넣어주지 않아서 발생하는 에러

const divRef = useRef<HTMLDivElement>(null)
profile
암흑개발자

0개의 댓글