• 카테고리

    질문 & 답변
  • 세부 분야

    모바일 앱 개발

  • 해결 여부

    미해결

범준님 오랜만이네요 새해 건강+부자되세용

22.02.17 11:21 작성 조회수 189

0

복습과정에서 에러가 나는데 아무리 뒤져봐도 통 ~ ~ ~ 

아래는 저의 깃헙주소이구요

https://github.com/dongguntechnology/rn_chat  

 

에러내용은  ErrorMessage.js  에서 아래 에러메세지가 발생하는 것 같습니다 

늘 건강하시고 번창하시길 ...

 

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

 

 

답변 2

·

답변을 작성해보세요.

0

shafeel2님의 프로필

shafeel2

질문자

2022.02.17

헉 !  캄사합니다

0

안녕하세요 shafeel2 님, 

  

ErrorMessage 컴포넌트를 사용할때 경로를 /components 로 잡고 하시는데, 
이렇게 하기 위해서는 components 폴더의 index.js 파일에 ErrorMessage 컴포넌트가 있어야 합니다. 

components/index.js 파일에서 ErrorMessage를 export 해주시면 문제가 해결됩니다. 
https://github.com/dongguntechnology/rn_chat/blob/main/components/index.js 

  

새해 복 많이 받으시고, 즐거운 하루 되세요

감사합니다.