Search code examples
reactjsreact-nativeexpoexpo-go

When I executes 'npx create-expo-app App3' in order to create a react native project the App.js file won't create


When I executes 'npx create-expo-app App3' in order to create a react native project the App.js file won't create it gives a different template without the App.js file. I've tried manually creating the App.js file and executing it but it doesn't work, I think expo app don't detect it. Below is the image of that template: File structure of the template creates when I executes 'npx create-expo-app App3'

I executed the 'npx create-expo-app App3' command to get the template of the reactive native project which is for expo-go. But the template doesn't have App.js file.


Solution

  • It is not an error.

    Expo has changed its routing system.

    Expo now use Expo-router which is a file-base routing. You don't need an index js or app.js file anymore. If you need it :

    1. you can search for the file node_modules/expo-router/index.js
    2. add it as index.js or app.js in the root of your repo.
    3. in package.json change main propecty value to "index.js" or "app.js" according to your filename choice.