Skip to content
Advertisement

React Native Error (Invalid Element Type)

when starting my App on my iOS device I get this error:

Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but gor: 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.

Check the render method of ‘App’.

JavaScript

When this is my App.js:

JavaScript

Since I am not using a class the statement “Check the render method of App.” shouldn’t be be useful to me.. I googled a bit and found out that, as a common error in React Native, can be resolved by adjusting imports and exports but unfortunately it didn’t worked for me.

Advertisement

Answer

You are bad importing NavigationContainer, for avoid types problem I recommend typescript 🙂

JavaScript
Advertisement