리액트 에러 expected a string or class/function

sohyun·2022년 10월 10일
0

error 잡자

목록 보기
2/3

에러

Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.

원인

  • 페이지에 들어가는 컴포넌트 함수를 만들지 않고 메인페이지에서 렌더시켰더니 에러뜸

해결책

  • import 된 파일들의 경로와 이름을 확인한다
  • 함수가 만들어지지 않은 빈 페이지를 연결했다면 함수를 만들어주기
profile
냠소현 개발일지

0개의 댓글