typically it is imported in index.js to get the name for the root component: https://github.com/facebook/react-native/blob/44beb2a685b7ceb0311bde7d0d33cb70bb891d30/template/index.js#L7
tl;dr: if you just inline the name in index.js or do something equivalent to that then yes you can delete it.
the history of this file:
- expo (formerly exponent) used exp.json as a way to configure things like your app icon, splash screen, and various other project config properties that you would typically configure in plist/xml files or in your IDE.
- the react-native team at facebook and expo worked together to make create-react-native-app (CRNA) in order to lower the barrier to entry to get started with react-native. CRNA used expo tools like expo client, some CLI libraries, and the project configuration format, but we wanted to make sure that CRNA wasn't specifically tied to just expo - so anyone else could build a similar tool and leverage CRNA for it. this motivated us to change exp.json to app.json, and make expo config just a key on that.
- we wanted projects created with CRNA and rn-cli to have a similar layout, so we moved the react-native template to use App.js and a single index.js (rather than index.ios.js and index.android.js iirc).
- we also wanted to be able to transition from a project built with CRNA (which did not have ios and android project directories with native code) towards one with full access to native code, so we added the eject command to rn-cli that would re-create the native project based on some configuration. the configuration was decided to be stored in app.json.
- the hope with app.json was to build tooling to apply config to native projects but it hasn't materialized yet. we've since moved the eject implementation entirely to expo-cli and continued building this there, now on ejecting we support a variety of properties, from facebook and google config to entitlements and permissions and so on (ios properties android properties).
- CRNA was archived because it was confusing to have both expo-cli and CRNA that did basically the same thing. we recently revived it to serve a slightly different purpose - it now initializes a react-native project in the same way as react-native-cli (with native projects) but also includes some libraries that we think are all but essential to most developers, includes react-native-web support out of the box, integrates with expo modules, includes ota-updates support pre-configured.
so yeah, that's why it's there. it could probably just be removed from the template now, it would be necessary to slightly modify the init scripts though.
Most helpful comment
typically it is imported in index.js to get the name for the root component: https://github.com/facebook/react-native/blob/44beb2a685b7ceb0311bde7d0d33cb70bb891d30/template/index.js#L7
tl;dr: if you just inline the name in index.js or do something equivalent to that then yes you can delete it.
the history of this file:
so yeah, that's why it's there. it could probably just be removed from the template now, it would be necessary to slightly modify the init scripts though.