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, or you might have mixed up default and named imports. Check the render method of ExpoRootComponent
.
#21276
Labels
Ran Commands
One of our bots successfully processed a command.
Resolution: Locked
This issue was locked by the bot.
Home.js
_import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
export default class Home extends React.PureComponent {
render() {
return (
Open up App.js to start working on your app!
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
});_
Screens.js
_import {Navigation} from 'react-native-navigation'
export function registerScreens(){
Navigation.registerComponent('Home',()=>require('./Home.js').default);
}_
App.js
_import { Navigation } from 'react-native-navigation';
import {registerScreens} from './Screens';
registerScreens();
Navigation.events().registerAppLaunchedListener(()=>{
Navigation.setRoot({
root:{
stack:{
children:[
{
component:{
name:'test.Home'
}
}
],
options:{
topBar:{
title:{
text:'Blog'
}
}
}
}
}
});
});_
What is the issue actually? i'm not getting really. Can anyone explain why this happen?
The text was updated successfully, but these errors were encountered: