In AppContainer (at renderApplication.js:39) In RCTSafeAreaView (at SafeAreaView.js:55)
In RCTScrollContentView (at ScrollView.js:1038) You likely forgot to export your component from the file it’s defined in, or you might have mixed up default and named imports. Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. Let’s look at the following issues and discuss how to address them if they pop up while you’re developing your next React Native app:
While they did address some of the worst errors, there is still a handful remaining that could go under the radar. Recently, the React Native team asked developers to help them determine which of these annoying errors lead to the most frustration. Some of the errors you may encounter could be misleading or very hard to find. But while it’s widely supported by the React community and Facebook, it’s still far from version 1.0. React Native is a great framework to implement your app for both Android and iOS platforms. Editor’s note: This post was updated on 7 March 2022 to reflect information relevant to React Native v0.67