'처음 배우는 리액트네이티브(한빛미디어, 김범준)' 공부 중 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'