Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React Native : 0.41 app.json

Tags:

What is the thing with the new app.json file generated in react native. I recently upgraded to 0.41.2 and found a new app.json file in my react project directory. Can someone help me figure out what this file is actually for ?

like image 926
Ashik Vetrivelu Avatar asked Feb 23 '17 07:02

Ashik Vetrivelu


2 Answers

That's used for the new react-native eject command. As stated in the RN source code:

The eject command re-creates the android and ios native folders. Because native code can be difficult to maintain, this new script allows an app.json to be defined for the project, which is used to configure the native app. The app.json config may contain the following keys:

  • name - The short name used for the project, should be TitleCase
  • displayName - The app's name on the home screen

Feel free to check the source

like image 58
dhorelik Avatar answered Sep 20 '22 12:09

dhorelik


Since I don't plan to eject I removed the app.json File (just to have less files flying around at root level). App still works as expected.

like image 35
tjeisenschenk Avatar answered Sep 18 '22 12:09

tjeisenschenk