강의

멘토링

커뮤니티

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

shafeel2님의 프로필 이미지
shafeel2

작성한 질문수

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

오전내내 에러원인을 찾아도 모르겠네요 죄송

해결된 질문

작성

·

6.2K

0

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.
 
파일은 https://github.com/dongguntechnology/rn-chat 에 있습니다

답변 2

0

shafeel2님의 프로필 이미지
shafeel2
질문자

대단히 감사합니다 

범준님께서는 미국에 거주하시나요 

 

하여튼 늘 건강하시고 부자되세요 *.^

0

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

안녕하세요 shafeel2님, 

  

Signin.js 파일을 보면, Button 컴포넌트를 가져올때 경로가
../components/Button 으로 되어있습니다.

components/Button.js 파일에서는 export default Button 이라고 했으니,
가져올땐 import Button from '../components/Button'; 으로 하셔야 합니다.

혹은 components/index.js 파일에서 import Button ~ export { Button } 코딩을 해놓으셨으니,
import { Button } from '../components'; 로 하셔야 합니다.  

  

즐거운 하루 되세요

감사합니다. 

shafeel2님의 프로필 이미지
shafeel2

작성한 질문수

질문하기