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

后端 未结 6 1201
南旧
南旧 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:26

    Some components are not universal between ios and Android.

    In terms of getting set up, create react native app keeps it simple for beginners and to get started. As you set up more complex views you will find you need to have a separate view for ios and Android.

    If you structure your app well, you can split the logic into one file and then have a separate view for ios, Android and even web. Essentially writing 1 app for 3 platforms.

提交回复
热议问题