Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

index.js file is not generated when eject my expo react-native app

I'm new to React Native and expo. I created a new project with that command expo init my-app then I opened my project with VSCode and run that command expo eject to eject to regular React Native app, after ejecting process is completed, I found that my project folder does not contain the index.js file, while the tutorial that I was following did the same steps I did before and the instructor got that index.js file?

What's wrong in my steps? Anyone can clear the whole idea?

like image 691
hassan moustafa Avatar asked Oct 06 '18 17:10

hassan moustafa


1 Answers

Yes, this happened with me too.

expo eject is not creating index.js

So, create index.js manually and add the following code to the file. It should work perfectly.

import { AppRegistry } from 'react-native';

import App from './App';
AppRegistry.registerComponent('your_app_name_here', () => App);
like image 149
Ank Avatar answered Oct 11 '22 18:10

Ank