• 카테고리

    질문 & 답변
  • 세부 분야

    모바일 앱 개발

  • 해결 여부

    해결됨

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

21.12.07 11:43 작성 조회수 3.87k

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

질문자

2021.12.07

대단히 감사합니다 

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

 

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

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'; 로 하셔야 합니다.  

  

즐거운 하루 되세요

감사합니다.