6 ms·
CRNA 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.
by jameside 10y ago
CRNA 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.
- RubenSandwich 10y agoExactly you are trying to to smooth out the gaps between React Native and Expo. You have every right to help your company succeed but the way this is presented here is that you did it as a neutral party, you did not. You crossed that line as soon as you included the Expo SDK by default. "Do you have the same concerns about the recommendation in the RN docs to use Airbnb's maps library?" No because that is not even an apt comparison. An apt comparison would be if AWS Engineers helped make 'react-create-app' and they bundled the AWS SDK as well merely to be 'helpful'. That would be an apt comparison not a recommendation on the official documentation to use a certain library. If you don't push people towards the Expo SDK then remove it from the default 'react-native-create-app', I'm okay with it being in certain templates but a private entity should not be in a default. You clearly benefit from this decision, yet your pretending that it is only because it's in the community best interest.
- altern8tif 10y agoThe beauty of open source is that you're free to fork the repo to include your own tooling if you so wish. Those who share the same concern as you can then go ahead to use your fork. Nobody is pushing anyone to use Expo's SDK. You are free to choose whether to use it or not. In the same way, you are free to use Facebook's React Native framework or not (bear in mind Facebook is a listed entity with its own corporate objectives as well).