{"action":"created","issue":{"url":"https://api.github.com/repos/react-native-community/discussions-and-proposals/issues/23","repository_url":"https://api.github.com/repos/react-native-community/discussions-and-proposals","labels_url":"https://api.github.com/repos/react-native-community/discussions-and-proposals/issues/23/labels{/name}","comments_url":"https://api.github.com/repos/react-native-community/discussions-and-proposals/issues/23/comments","events_url":"https://api.github.com/repos/react-native-community/discussions-and-proposals/issues/23/events","html_url":"https://github.com/react-native-community/discussions-and-proposals/issues/23","id":354444745,"node_id":"MDU6SXNzdWUzNTQ0NDQ3NDU=","number":23,"title":"Use Expo CLI in the Quick Start section of the docs","user":{"login":"fson","id":497214,"node_id":"MDQ6VXNlcjQ5NzIxNA==","avatar_url":"https://avatars3.githubusercontent.com/u/497214?v=4","gravatar_id":"","url":"https://api.github.com/users/fson","html_url":"https://github.com/fson","followers_url":"https://api.github.com/users/fson/followers","following_url":"https://api.github.com/users/fson/following{/other_user}","gists_url":"https://api.github.com/users/fson/gists{/gist_id}","starred_url":"https://api.github.com/users/fson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fson/subscriptions","organizations_url":"https://api.github.com/users/fson/orgs","repos_url":"https://api.github.com/users/fson/repos","events_url":"https://api.github.com/users/fson/events{/privacy}","received_events_url":"https://api.github.com/users/fson/received_events","type":"User","site_admin":false},"labels":[{"id":1010419327,"node_id":"MDU6TGFiZWwxMDEwNDE5MzI3","url":"https://api.github.com/repos/react-native-community/discussions-and-proposals/labels/%F0%9F%92%A1%20Proposal","name":"💡 Proposal","color":"f4930c","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":28,"created_at":"2018-08-27T19:22:32Z","updated_at":"2018-11-02T15:14:29Z","closed_at":"2018-10-19T00:05:01Z","author_association":"NONE","body":"## Summary\r\n\r\nWe propose changing the Quick Start docs to use the `expo-cli` package instead of `create-react-native-app`.\r\n\r\n- **Expo CLI is a tool based on CRNA, made by the same team**\r\n- **It has all the same features, plus some additional benefits (see below)**\r\n- **Like CRNA, Expo CLI does not require an Expo user account**\r\n- **The `create-react-native-app` command will continue to work**\r\n\r\n## Background\r\n\r\nCurrently the Quick Start section of docs shows how to get started using Create React Native App (CRNA). In the past few months, I and my colleagues at Expo have been working on Expo CLI, which aims to bring CRNA to the next level. Expo CLI builds on and extends CRNA.\r\nExpo CLI follows the same philosophy as CRNA (from https://github.com/react-community/create-react-native-app/blob/master/README.md#philosophy):\r\n\r\n- **Minimal \"Time to Hello World\"**: Create React Native App should reduce the setup time it takes to try building a mobile app to the absolute minimum, ideally on par with React web development (especially as seen with Create React App).\r\n- **Develop on Your Device**: It should be easy to develop on a physical device when you want to test how your app feels and responds to inputs.\r\n- **One Build Tool**: If you just want to get started with React Native, you shouldn't need to install Xcode, Android Studio, NDKs, or mess with environment variables.\r\n- **No Lock-In**: You can always \"eject\" to your own build setup if you need to write custom native code or modify how your app is built.\r\n\r\nIn addition to everything offered by CRNA, Expo CLI also has these additional features:\r\n\r\n- **Web-based user interface**: in addition to the CLI, there's a GUI where you can view logs, launch the app on your devices or simulators, and publish updates.\r\n- **Standalone app builds**: you can build IPA and APK packages for deploying to App Store and Play Store without using Xcode or Android Studio.\r\n- **Publishing**: you can push updates to your deployed apps and optionally publish your app to Expo.io.\r\n- **Tunnel**: your physical device doesn’t need to be in the same wi-fi as your computer to be able to develop using it.\r\n- **Optional user accounts**: logging in allows listing all your projects in development in the Expo app without having to scan any QR codes and enables additional features like standalone builds. However, just like CRNA, Expo CLI can also be used without a user account.\r\n\r\nAll apps originally created using CRNA also work with Expo CLI and like before, will be able to use Expo APIs in addition to core React Native APIs.\r\n\r\n## Why\r\n- **Just one tool to learn:** previously developers would start with CRNA and then switch to exp or XDE for additional features like standalone builds. Expo CLI is as easy to get started with as CRNA, but also supports everything previously offered by these separate tools.\r\n- **Less confusing options**: CRNA apps have always been loaded using the Expo app and able to use the Expo APIs in addition to the core React Native APIs. Users are sometimes [confused](https://github.com/react-community/create-react-native-app/issues/153) about the differences between plain React Native, CRNA and Expo apps created with tools like exp or XDE. Installing the `expo-cli` package will make it clearer the additional functionality is provided by Expo.\r\n- **Developer experience:** as described above, Expo CLI is ahead of CRNA in terms of features and developer experience, and we’re continuously improving it.\r\n- **Maintenance**: having these two projects as separate codebases requires more maintenance and CRNA has previously falled behind because of this. A single codebase helps us keep it up to date and fix issues as fast as possible.\r\n## How\r\n\r\n**What will happen to the `create-react-native-app` package?**\r\nThe `create-react-native-app` tool is used to create new CRNA projects. The old way to create a project was:\r\n\r\n    $ npm install -g create-react-native-app\r\n    $ create-react-native-app my-app\r\n    $ cd my-app/\r\n    $ npm start\r\n\r\nAfter the migration, new projects will be created with `expo init`:\r\n\r\n    $ npm install -g expo-cli\r\n    $ expo init my-app\r\n    $ cd my-app/\r\n    $ npm start\r\n\r\nAdditionally, to ease the migration and to ensure that all existing resources and examples using CRNA will keep working in the future, we’ll make `create-react-native` delegate to Expo CLI by default (unless invoked with the `--scripts-version` or `--reason` flags):\r\n\r\n    $ create-react-native-app my-app\r\n    This command requires Expo CLI.\r\n    Do you want to install it globally [Y/n]?\r\n    Installing the package 'expo-cli'...\r\n    ? Choose a template: (Use arrow keys)\r\n    ❯ blank\r\n      The Blank project template includes the minimum dependencies to run and an\r\n      empty root component. \r\n      tabs\r\n      The Tab Navigation project template includes several example screens. \r\n\r\n**What will happen to existing projects and the `react-native-scripts` package?**\r\nWhen upgrading from `react-native-scripts`, users will need to change the scripts in `package.json` to use `expo` instead of `react-native-scripts`.  The scripts were previously created like this by default:\r\n\r\n      \"scripts\": {\r\n        \"start\": \"react-native-scripts start\",\r\n        \"eject\": \"react-native-scripts eject\",\r\n        \"android\": \"react-native-scripts android\",\r\n        \"ios\": \"react-native-scripts ios\",\r\n        \"test\": \"jest\"\r\n      }\r\n\r\nThis needs to be changed to:\r\n\r\n      \"scripts\": {\r\n        \"start\": \"expo start\",\r\n        \"eject\": \"expo eject\",\r\n        \"android\": \"expo start --android\",\r\n        \"ios\": \"expo start --ios\",\r\n        \"test\": \"jest\"\r\n      }\r\n\r\nAfter this the `react-native-scripts` can be removed from `devDependencies`. Running any of the scripts will install `expo-cli`, unless it’s already installed.\r\n\r\nTo ease the migration for existing users, we will publish an updated version of `react-native-scripts` that delegates commands like `start`, `ios` , `android`, and `eject` to corresponding `expo` commands automatically, so they’ll keep working even when the `scripts` in `package.json` has not been changed. It will also show a warning that explains how to update the scripts to use Expo CLI.\r\n"},"comment":{"url":"https://api.github.com/repos/react-native-community/discussions-and-proposals/issues/comments/435412905","html_url":"https://github.com/react-native-community/discussions-and-proposals/issues/23#issuecomment-435412905","issue_url":"https://api.github.com/repos/react-native-community/discussions-and-proposals/issues/23","id":435412905,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNTQxMjkwNQ==","user":{"login":"borgogelli","id":7045594,"node_id":"MDQ6VXNlcjcwNDU1OTQ=","avatar_url":"https://avatars3.githubusercontent.com/u/7045594?v=4","gravatar_id":"","url":"https://api.github.com/users/borgogelli","html_url":"https://github.com/borgogelli","followers_url":"https://api.github.com/users/borgogelli/followers","following_url":"https://api.github.com/users/borgogelli/following{/other_user}","gists_url":"https://api.github.com/users/borgogelli/gists{/gist_id}","starred_url":"https://api.github.com/users/borgogelli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/borgogelli/subscriptions","organizations_url":"https://api.github.com/users/borgogelli/orgs","repos_url":"https://api.github.com/users/borgogelli/repos","events_url":"https://api.github.com/users/borgogelli/events{/privacy}","received_events_url":"https://api.github.com/users/borgogelli/received_events","type":"User","site_admin":false},"created_at":"2018-11-02T15:14:29Z","updated_at":"2018-11-02T15:14:29Z","author_association":"NONE","body":"What is the react-native-cli npm package ? Is it deprecated too ?"}}
{"actor":{"display_login":"borgogelli"}}