title: Basic app not working in Web after changing App.js to App/index.js
body: <p>I'm new to React Native and tried to follow the lesson &quot;<a href="https://learn.reactnativeschool.com/courses/175915/lectures/17152118" rel="nofollow noreferrer">Organize a React Native Project</a>&quot; so I moved the code from <code>App.js</code> to <code>App/index.js</code> and deleted <code>App.js</code>. That works fine in the Android simulator but not in the Web browser.</p>
  <p>There I get this error:</p>
  <pre><code>Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.
  
  Check the render method of `ExpoRootComponent`.
  ▶ 24 stack frames were collapsed.
  registerRootComponent
  C:/Users/me/Documents/src/launch/registerRootComponent.web.tsx:14
    11 |   const RootComponent: React.FC&lt;P&gt; = props =&gt; &lt;App {...props} /&gt;;
    12 |   AppRegistry.registerComponent('main', () =&gt; RootComponent);
    13 |   const rootTag = document.getElementById('root') ?? document.getElementById('main');
  &gt; 14 |   AppRegistry.runApplication('main', { rootTag });
    15 | }
  </code></pre>
  <p>My app code is really simple, it is the default one from the Expo basic template. <code>index.js</code> :</p>
  <pre><code>import { StatusBar } from 'expo-status-bar';
  import React from 'react';
  import { StyleSheet, Text, View } from 'react-native';
  
  export default function App() {
    return (
      &lt;View style={styles.container}&gt;
        &lt;Text&gt;Open up App.js to start working on your app!&lt;/Text&gt;
        &lt;StatusBar style=&quot;auto&quot; /&gt;
      &lt;/View&gt;
    );
  }
  
  const styles = StyleSheet.create({
    container: {
      flex: 1,
      backgroundColor: '#fff',
      alignItems: 'center',
      justifyContent: 'center',
    },
  });
  </code></pre>
  <p>I have run the commands <code>expo start</code> and <code>npm start</code> but no difference.</p>
  <p>Provide (the default) <code>AppEntry.js</code> in case it is of interest:</p>
  <pre><code>import registerRootComponent from 'expo/build/launch/registerRootComponent';
  
  import App from '../../App';
  
  registerRootComponent(App);
  </code></pre>