AppLoading 컴포넌트 에러

Cornflower blue·2021년 12월 15일
0

리액트네이티브

목록 보기
3/7

'처음 배우는 리액트네이티브(한빛미디어, 김범준)' 공부 중 AppLoading 컴포넌트 사용 시 에러가 발생했다.

Error: Element Type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined

import {AppLoading} from 'expo'를 하여도 AppLoading를 사용할 때 관련 컴포넌트를 가져오지 못해 발생하는 문제라고 한다. Expo SDK 40부터 기본 컴포넌트에서 관련 컴포넌트가 빠지면서 생기는 문제라고 한다.

expo install expo-app-loading
패키지를 설치하여 문제를 해결할 수 있다.
import AppLoading from 'expo-app-loading'

출처

https://sinawi.tistory.com/350

profile
무언가를 만들어낸다는 것은 무척이나 즐거운 일입니다.

0개의 댓글