Invariant Violation: Invariant Violation: 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.
아직 mount 되지 않은 혹은 unmount 된 컴포넌트에 forceUpdate 나 setState 를 수행하려고 하면 아래와 같은 오류가 발생한다.
그래서 내가 삽질했다;
에러가 뜰리가 없는데, 자꾸 나서.. 하나씩 지워나갔는데 다 지워도 에러가 계속 뜨더라.
결국 import까지 하나씩 지워봤는데 react-base를 import하니까 에러가 뜬거였다 ㅂㄷㅂㄷ
버전도 낮춰보고 node_module 지우고 재설치하고 별걸 다해봤지만 해결되지 않았다.
https://github.com/facebook/react-native/issues/16332
그러다가 깃헙 이슈를 발견했는데 react-base의 image를 react-native의 image로 바꿔보랜다.
으엥 설마 이거겠어 했는데 잘됨,ㅋㅋ
공식문서를 찾아봤는데 react-base에 image가 없었다. 없어진건가? react-base의 image를 쓰는 글이나 유투브는 많았는데.
그리고 2차충격, react-base 공식문서의 예제에서도 image를 react-native에서 임포트했다. 이래서 공식문서로 공부하라고 하는가부다
https://docs.nativebase.io/Components.html#Components
'공부, 오류일기 > React Native' 카테고리의 다른 글
Could not load expo Network response timed out 에러해결 (0) | 2019.07.15 |
---|---|
오늘의 일지 (0) | 2019.07.15 |
[Unhandled promise rejection: TypeError: ref.putFile is not a function. (In 'imagesRef.putFile(fileUri)', 'imagesRef.putFile' is undefined)] (0) | 2019.07.14 |
npm ERR! A complete log of this run can be found in: 에러해결 (0) | 2019.07.11 |
우분투 visual studio code 에서의 한글입력 안됨 및 저장시 권한거부 (1) | 2019.07.08 |