-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Difference between create-react-native-app and Expo? #153
Comments
Good question, the short answer is that create-react-native-app is the quickest way to start a new React Native project. It uses the Expo client and some of the Expo devtools but not all of them. For example, you don't need to create an Expo developer account to use CRNA and we've found it's faster to get started with CRNA than with XDE (the Expo development app). Since CRNA projects run in the Expo client, you do have access to most of the Expo APIs such as native maps, audio, OpenGL, and more. There are a couple of exceptions like push notifications that only Expo projects can use, but there are many more similarities than differences between CRNA projects and Expo projects. CRNA was also designed to give you several paths forward as your app grows. The three paths are:
Note that when you eject, CRNA won't manage upgrades for you so you're responsible for upgrading React Native. |
I notice that the file structure for a CRNA is different than both typical react native and Expo generated apps. (Especially the roots of the apps are different. (eg: No index.ios.js) Also the way the root file is setup is different. (eg: CRNA apps don't register their entry component, but instead export them). |
Not yet! |
In that case I would advise others getting started to do what I did. Create sample apps in all three environments (React native, CRNA, and Expo). Then open them all up at the same time in Atom to look at the file structure of each one. That way when you are flipping between the documentation of all three you will have a reference to what is going on. |
Does one need to eject to ExpoKit in order to use the expo push notifications? |
@kristojorg To use Expo Push Notifications you'll need to use Expo's devtools (XDE or exp, docs here: https://docs.expo.io) which will enable your project to send push notifications. If you eject to ExpoKit, Expo push notifications won't work (as of April 2017) for technical reasons (e.g. Expo doesn't have the push certificate for your ejected app needed to send push notifications). Instead you should use the native iOS & Android APIs to get the device token and send push notifications manually. |
@ide Thank ! Somehow the push notifications just started working... before I was getting: For the record, I am still somewhat confused as to if there is a difference between running a CRNA via command line And also thank you so much for all the work here and through React Native : ) |
CRNA projects are designed not to depend a lot on Expo services. For example you don't need an Expo developer account. When you use XDE you now have an Expo account and are developing an Expo project so you can use Expo services. |
if eject to expoKit , i cant run command "react-native run-android" ? |
@VinhDev With ExpoKit you run your Android project from Android Studio / Gradle / whatever you'd use for a typical Android project. The only react-native CLI command that is supported is |
how does expo build app with native android/ios SDKs? |
Project created from expo toolkit doesnot have ios file. Should i create file my self? or what is the correct method? |
Same question here. Why it does not have index.ios.js and index.android.js? Feel a bit confused while following tutorials online. |
You can just start writing code in App.js. If you want to have separate files for each platform, you can make |
When installing the new version of react-native and being forced to use Expo, I notice that when making some simple change, the reload is slower. Are you the same? |
Expo shouldn't be slower. If you're using exp or XDE, those set up an exp.direct tunnel URL by default which goes over the internet. This is slower but lets you share your project with collaborators or devices that aren't on the same WiFi network. You can set exp or XDE to use a LAN IP URL instead if all your devices are on the same network and can access each other. |
Can we add third party lib which needs to add code in xcode and android studio when using Expo? |
Am i able to run app on ios if i eject to expokit? |
How to handle Expo Xde in case of ubuntu? |
@Mythrim you don't need to use the XDE IDE, you can use the command line |
Thank you for CRNA and Expo, Apps that use only Expo can't launch first time with no internet connection, it requires Internet, so the JS bundle and assets are downloaded then the app runs normally, is that situation the same in CRNA apps? Do CRNA apps run with no Internet in the first launch? |
Hello I'm totally new to react and reactnative, was wondering if someone can provide guidance. I would like to build an iOS and Android app, on a Windows laptop. Is it possible to compile the iOS app this way? If so please provide some insight on this. Tks |
Hey @lawrenceong001 I have created app using expo. So all I did is followed this so now I'm able to run my app without emulator/simulator all I need to do was to keep my windows machine and mobile device in the same network. |
Thanks @sohaibjaved44, I was wondering if I can also deploy to Apple appstore without a Mac too. |
Can i use Expo camera instead of React-native camera? |
@JordiGoPython yes you can |
In summary, which is preferrable? |
@smithaitufe - it doesn't really matter. https://docs.expo.io/versions/latest/guides/create-react-native-app.html |
I found this thread after running into problems getting react-native-camera to work with react native 0.52, after starting project with create-react-native-project. I'm not alone, it it appears: react-native-camera/react-native-camera#272 I'm now pursuing expo camera. |
so if i had to chose |
@Mifayo Save yourself from headaches. |
According to @anp there is no official tutorial on how to properly eject CRNA to build non-debugging versions for on-device deployment and this obviously hasn't changed for nearly one year. Having spent months on creating app using CRNA and now I have to study code of react-native to get an idea of how to fix the missing index.ios.js/index.android.js-issue? There is no tutorial and that's it? Is there any ongoing development on supporting CRNA at all? Why care for it at all if ejecting was working some day in the past but no one has taken care of this path working for that long time. Maybe just fix the docs explaining that using CRNA might render wasted time ... won't take a day to add this explanation. And it would help devs from even trying CRNA in the first place. AFAIU it would reduce manpower required to develop Expo App, too ... WinWin for everyone. UPDATE: To clarify the issue to myself. I tried creating vanilla project on same host running UPDATE: Found some example index.ios.js in README on native-base-shoutem-theme and found it quite similar to the existing App.js. So tried copying App.js into index.ios.js ... downloading bundle failed again due to not having found any index.ios.js in any of the roots (listing the folder I was copying the file to right before). I really don't get this chaos. |
@soletan I'm a bit confused about what you're having issues with -- can you open an issue with more details on what you're trying to achieve? |
Well, sorry for hijacking this thread most probably. I was basically having issues with problems mentioned in this thread before regarding missing index.ios.js files in a CRNA, even after ejecting it. I was referring to you due to your instant answer to that post considering the lack of some documentation. My app still isn't running after ejecting it. The lack of index.js had to be fixed manually. Can't remember having read anything about that in any of the docs. And docs are quite distributed. In one place eject is claimed to ask questions about how I want to build things, but that didn't happen in my case. SO indicates use of Claiming CRNA to be a good start for creating react-native applications is pretty misleading. Okay, might be a good start, but it's a terrible end as all time saved in the beginning is wasted steps before finish line. |
I have a question about Privacy/Security. As mentioned in docs, I need to send my bundle to Expo build it and even my keystore. I wonder to know who is Expo and what kind of trusts do I have. |
will apple approve CRNA apps? looks like its hot code push through expo xde slug url. |
@dsp1589 - yes they will. same thing as other react native apps, and millions of cordova apps, etc. |
@soletan - thanks for the info, a new issue for that would be great. @allanesquina - you also don't need to send your keystore if you want to build it locally - https://github.com/expo/expo#standalone-apps. additionally, just use
I don't understand your argument here, but if you feel very strongly about it please open a PR on react-native with your suggested changes to the getting started guide and your arguments for why this should be done and we can certainly discuss. Either way this thread is not the right place. |
Sorry if this is not the best forum, but what is the difference between using create-react-native-app and using the Expo toolset? And why would someone pick one or the other?
The text was updated successfully, but these errors were encountered: