본문 바로가기
STUDY (My Job)/에러사항

20221205_에러 'useState' , 'useRef' is not defined no-undef

by 태태. 2022. 12. 5.
728x90

Compiled with problems:X

ERROR

[eslint] src\Components\UseRefComponent2.js
Line 4:29: 'useState' is not defined no-undef
Line 5:20: 'useRef' is not defined no-undef

Search for the keywords to learn more about each error.
 

에러화면


해결방법

컴포넌트 파일에서,

import 부분에 {  useState, useRef  } 가 빠져 있진 않은지 검사한다. 

 

참고)App.js 파일

 

728x90
반응형

댓글