React Native project, index.ios.js or index.android.js not generated

前端 未结 2 1127
执念已碎
执念已碎 2020-11-30 09:05

I started with React-Native today. And I am following a web tutorial.

Did all the installations correctly on my Windows machine:

  • Java Jdk
  • And
2条回答
  •  一个人的身影
    2020-11-30 09:29

    Simply because the new project template now doesn't contain index.android.js and index.ios.js separately. It now only contains a one minimal index.js entry point.

    If you want to do something specific for both/one of the platforms then you can create your own index.android.js and index.ios.js files and then just import the code in both of them from index.js file and do the necessary changes there.

    index.android.js and index.ios.js can be written as:

    import Render from './App';
    
    export default Render;
    

提交回复
热议问题