강의

멘토링

커뮤니티

인프런 커뮤니티 질문&답변

shafeel2님의 프로필 이미지
shafeel2

작성한 질문수

처음 배우는 리액트 네이티브

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

작성

·

255

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
질문자

헉 !  캄사합니다

0

김범준님의 프로필 이미지
김범준
지식공유자

안녕하세요 shafeel2 님, 

  

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

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

  

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

감사합니다. 

shafeel2님의 프로필 이미지
shafeel2

작성한 질문수

질문하기