When I going to run my react native app on my iPhone Expo this error displayed in red background area.
Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object. You likely forgot to export your component from the file it's defined in.
this is the App.js inside the 'src/components/' folder
import React, { Component } from 'react';
import { View, Text } from 'react-native';
export default class App extends Component {
render() {
return (
<View>
<Text>Hello</Text>
</View>
);
}
}
This is the main App.js in react-native app folder.
import App from './src/components/App';
I used expo app for run this code. How can I solve this error?