Advantages of having index.ios.js instead of just index.js

后端 未结 6 1213
南旧
南旧 2021-02-04 19:58

New to react-native and used create-react-native-app to make the scaffolding for my first app. It made an App.js which I guess is equivalent to most ap

6条回答
  •  无人共我
    2021-02-04 20:28

    if you will see this repo https://github.com/react-community/create-react-native-app you'll know that create-react-native-app is Expo product. All your app compiling on Expo servers and index.android.js and index.ios.js located there.

    If you want to modify platform files, you need to run

    npm run eject
    

    After that, you'll get a raw react-native project with all dependencies (npm, cocoapods, react-native modules) and of course index.android.js and index.ios.js

提交回复
热议问题