Thank you for the help so far,
I am new to React Native, and I'm trying to develop a cross-platform app. Here is my index.js file:
import React from 'react';
{
Component,
View,
Text,
} from 'react-native';
class MyReactApp extends Component {
render() {
return (
<View><Text>Hello world</Text></View>
);
}
}
module.exports = MyReactApp;
Next, I imported the index.js into both index.ios.js and index.android.js like this:
import { AppRegistry } from 'react-native';
MyReactApp from './index';
AppRegistry.registerComponent('MyReactApp', () => MyReactApp);
Everything seemed correct, but I encountered this error: