• 카테고리

    질문 & 답변
  • 세부 분야

    풀스택

  • 해결 여부

    미해결

FileUpload 컴포넌트 오류

22.09.02 15:35 작성 조회수 198

0

강의 내용과 동일하게 react dropzone 페이지에서 동일하게 소스를 복사해 컴포넌트를 생성 후 UploadProductPage에 import를 했는데 다음과 같은 오류가 발생합니다.

Hook은 함수 컴포넌트 내부에 선언되어야 한다는 오류인데 코드 내용을 보아 Hook이 적용된 부분은 딱히 없는것 같습니다.

Error: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons: 1. You might have mismatching versions of React and the renderer (such as React DOM) 2. You might be breaking the Rules of Hooks 3. You might have more than one copy of React in the same app See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.

답변 0

답변을 작성해보세요.

답변을 기다리고 있는 질문이에요.
첫번째 답변을 남겨보세요!