Reputation: 1590
While looking for more resource/project/source code about React Native I notice that some of the others' project structure is little bit different from mine.
Structure deviation:
I create React Native with the command of react-native init ProjectName
, I notice that there are different commands to create a project, too.
Question:
1.What are the differences between the Project Structure in the image above, why are they having different files?
2.Does their difference effect the way of coding in any other way?
Thank You.
Upvotes: 0
Views: 393
Reputation: 1625
For the first question , it just just a version difference .
upto v 0.48 , we had different files like index.android.js and index.ios.js, they did this change to optimize the code.
const instructions = Platform.select({
ios: 'Press Cmd+R to reload,\n' +
'Cmd+D or shake for dev menu',
android: 'Double tap R on your keyboard to reload,\n' +
'Shake or press menu button for dev menu',
}); // this is what u see in present versions , in previous versions it was done using different files
For the second question :
no, it won't affect your coding
Upvotes: 1