5 ms·
I wouldn't go so far to say that you are not 'attaching React Native to Expo in any way', this tool which will soon be the default way to create React Native pr
by RubenSandwich 10y ago
I wouldn't go so far to say that you are not 'attaching React Native to Expo in any way', this tool which will soon be the default way to create React Native projects installs the Expo SDK. This is by definition attaching Expo to the projects I create using this tool.
- evv 10y agoIf you have all the native dependencies, you can always make a RN app the old-fashioned way- `react-native init`. This is not going away. The Expo client is open source, so you can fork it for your needs if you want. Also, if you do start an app with CRNA, and decide that you want to avoid everything-Expo-related, you can eject to a native app with one command. In summary, we have been careful to craft the CRNA solution to have absolutely zero lock-in.
- lacker 10y agoI wouldn't say that this tool "will soon be the default way to create React Native projects". We want React Native to recommend the set of tools that is most suited to developers, but not be tied to a particular one. For example, we have at times recommended Genymotion when we thought it was the best recommendation, even though it's tied to a private entity. We would like to hear from the React Native community what methods of getting started are the most well-regarded, before changing any recommendations on the React Native website. If you don't want to use Expo that is totally fine, you can just use `react-native init` which isn't going away.
- RubenSandwich 10y agoI believe that 'react-native init' is not going away. But I'm sure that in all documentation going forward 'create-react-native-app' is going to be used as it is a simpler tool to uses the verbs people know in npm. So by that logic it will be basically be the default way.
- jameside 10y agoCRNA includes an "eject" command similar to CRA's. So anyone could eject to bare React Native (like react-native init) if they want or need that option.
- RubenSandwich 10y agoDoes the eject command remove the Expo SDK? If not then I would not call it bare React Native.
- dikaiosune 10y agoIt does. There's an option to include the sdk in the ejected app, but it's not the default.
- RubenSandwich 10y agoI see you included this warning: https://github.com/react-community/create-react-native-app/blob/master/react-native-scripts/src/scripts/eject.js#L18 https://github.com/react-community/create-react-native-app/b.... I still don't understand why this had to ship with the Expo SDK. You are only going to have Newbies equate React Native with Expo. I am still of the opinion that this is not a right move for a development tool. If you want to help make 'create-react-native-app' then great, but it should not favor a private entity.
- dikaiosune 10y agoI'm very sensitive to the concerns you've raised in this thread. I've discussed these issues quite a lot, and ultimately decided that it's better to provide a net win to the React Native tooling ecosystem, and try to smooth out the gaps between React Native and Expo. I do think CRNA is a good improvement over the current state of "getting started" in React Native. Regarding your concerns about "private entities," React Native is open source. Expo is open source. React Native was created and is maintained by Facebook, a private entity. Expo was created by and is maintained by Expo, a private entity. Do you have the same concerns about the recommendation in the RN docs to use Airbnb's maps library? In order to use CRNA, you need to have a client that can fetch and load the JavaScript bundles. CRNA is agnostic to which client you use, which is why app.json puts any Expo specific configuration under an `expo` namespace. Anyone is welcome to implement their own client and use that if they prefer. I'd be very happy to review PRs which support loading React Native JavaScript in an alternative client. As an implementation detail of the Expo client, a number of native APIs are exposed, and it would be infeasible to block CRNA apps from accessing them. We don't push users towards the Expo SDK, and the template project doesn't make use of any Expo APIs. If users choose to include a dependency on Expo's code, then we warn them that ejecting will break that dependency -- that's it. We choose a default choice in that prompt on the basis that we don't want to push users towards breaking their app.