diff --git a/packages/create-react-native-library/templates/expo-library/example/App.js b/packages/create-react-native-library/templates/expo-library/example/App.js deleted file mode 100644 index 834a527f7..000000000 --- a/packages/create-react-native-library/templates/expo-library/example/App.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from './src/App'; diff --git a/packages/create-react-native-library/templates/expo-library/example/index.js b/packages/create-react-native-library/templates/expo-library/example/index.js new file mode 100644 index 000000000..018d06f91 --- /dev/null +++ b/packages/create-react-native-library/templates/expo-library/example/index.js @@ -0,0 +1,8 @@ +import { registerRootComponent } from 'expo'; + +import App from './src/App'; + +// registerRootComponent calls AppRegistry.registerComponent('main', () => App); +// It also ensures that whether you load the app in Expo Go or in a native build, +// the environment is set up appropriately +registerRootComponent(App);