Should I go with react native with expo or I should eject it - react-native

I have to create a small react native app with some charts and graphs I need to know should I go with expo or not. What challenges can I face if I continue with expo.

i'm completely new to StackOverflow, but i have some experience in developing apps in react native, so far i have developed 6 apps(2 of them with expo) and they are already in play store/app store, my advice to the decision of whether to choose expo, eject, or go straight to react-native, is first of all evaluate what needs has the app that you are going to develop, all of them have their pros and cons, expo for example is super fast, you can have an app ready for production in weeks, to eject from expo is a very difficult thing to do, and to be honest i gave up on this and had to rebuild an entire project because i took the wrong decision on choosing expo, so i ended up rebuilding it in react native pure, now when i start a new project i tend to evaluate very deeply the needs of the project, review if expo is going to be enough for that needs. With React-Native pure projects you have the ease to add libs going straight to xcode, android and modifying directly there, and also have access to more native functionality.

Related

How to measure react native (Expo) app startup time?

I have an Expo hybrid app (Managed workflow), running on Expo SDK v37 (React Native v0.61).
I'm struggling to find the best way to measure the time it takes from the moment when the user starts the app until the splash screen disappears.
How would you approach this?
PS: I would use Firebase Performance Monitoring instead, if it was available for Expo Managed apps. But it isn't yet.
Basically I see two approaches:
For pure react-native projects you can use react-native-startup-time library.
However I'm not sure, whether you can just add this library and start to use it, since it's required linking.
But in any case you can eject your project and add this library.
If you don't want to eject expo project I can suggest you to update your project to SDK 38. It has support for RN 0.62.2 and flipper integration as well. So you can setup flipper-plugin-react-native-performance and check the performance.
I hope I helped a bit.

Should I use Expo for expo audio library or React-native-track-player?

I have my project which I initialised with 'react-native init' . I am thinking of using expo audio library because of it's robust functionalities . But , I have read Expo isn't the solution. It increases the app size. You've to eject it in the end. So can anyone suggest me which woulod be a better solution in this case?
Some of the shortcomings of Expo:
Does not play nicely with Hot reloading
Linking with third party library can be cumbersome sometimes.(Expo include the facebook sdk which is a overhead.)
Poor notification service.
I had a project first made with expo , then after few time , got to realize the limitations. I would surely say expo is only for learning react native. You should never use expo for production. Here are the few things ive observed which i would like to share :
Expo app size is huge and app becomes very laggy .
You cant use libraries where linking is required and thats a big no no.
You dont have hold over app size bundling , specially in android as you can use a few tweaks like hermes etc to make your app more faster.
And you can always use expo libraries in react native by using https://github.com/unimodules/react-native-unimodules
I would suggest you should use bare react native rather than expo.
Hope it helps . feel free for doubts

ReactNative Eject Explained

I literally started reading about ReactNative an hour ago and am reading this git readme https://github.com/react-community/create-react-native-app/blob/master/react-native-scripts/template/README.md
Next I googled about it and found this link which seem to be explaining it but not to me novice in web, react, or react-native
https://github.com/react-community/create-react-native-app/blob/master/EJECTING.md
Can someone explain to me as if I am 2 years old what is the meaning of eject? I keep hearing term "ejected project" but I cannot wrap my head around it.
Summary
If you created an app using create-react-native-app MyApp, ejecting your app gets your app to be the same as if you created your project using react-native init MyApp
aka
create-react-native-app MyApp > make changes to app > eject app
is roughly equivalent to
react-native init MyApp > make changes to app
More Details
What's the difference between create-react-native-app MyApp and react-native init MyApp?
Quick start vs. Full scale development
The philosophy behind create-react-native-app is:
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).
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.
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.
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.
Essentially, create-react-native-app lets you get up and running quickly without having to a do a lot of (or any) configuration. In order to do this, it hides a lot of details from you.
If you want to create a serious app, you need to set up a real development environment. You can do this from scratch by running react-native init <project-name>. If you started with a react native project using create-react-native-app, you can get to this same place by "ejecting" your app
More details from the official documentation about getting started with React Native can be found here.
My understanding is that when you run the "create-react-native-app" (or "expo init" now) you are basically adding the Expo library on top of React Native.
I think the main reason for using Expo is to get your app up and running quickly. I think the main reason to eject is that eventually you might need to do more complicated customization with native code and need more control, etc. Here is a better explanation of Expo vs React Native CLI to bootstrap your app:
https://levelup.gitconnected.com/expo-vs-react-native-cli-a-guide-to-bootstrapping-new-react-native-apps-6f0fcafee58f
When you eject you are returning to the same state as if you did not use Expo to setup your app (native ios/android projects will be generated, etc.)
Here are a few other links that helped me understand:
http://www.reactnativeexpress.com/environment
https://docs.expo.io/versions/latest/expokit/eject/

React Native vs CRNA [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Closed 2 years ago.
Locked. This question and its answers are locked because the question is off-topic but has historical significance. It is not currently accepting new answers or interactions.
I want to start with React Native app development and need help to decide on which path I should go.
The main question is: should I go with React Native or create react native app?
From what I understand, CRNA really is react native using the expo client and tools, with a more comfortable use (no dev account required, etc)
I can see the advantages with using CRNA over react native (no being no need to set up dependencies, faster time to start with developing, no need for iPhone dev account or xcode+android combi, etc.)
However, as not all native libraries are included, I see myself in the need to export my app at a later point anyway and continue to work with xcode and Android Studio just like before.
So, if CRNA is just a nice way to get started with everything, then I would go for vanilla react native right away as I see no point in a temporary solution at all.
Also, and maybe you can correct me on this, I do not like the idea to have just another wrapper on top of my app, unless there are some more crucial advantages which I missed out.
So could you please share your experience on this? If you have developed apps with react native in the past, which path did you go and which path will you go in the future? React Native, CRNA or React Native and expo environment?
Hi I will also share some of my experience on the topic.
Since I have a front end background and was not familiar with XCode or Android Studio I've decided to start my native app developement from CRNA.
Indeed with just a text editor, purely with javascript and utilizing built-in expo SDK components I was quickly able to implement and publish to Play Store a fairly simple app.
That I find truly amazing :)
However after publishing the app I realized there are some pitfalls that unable it to compete with similar rival Java apps:
The biggest IMO is the size of the apk generated with exp
service.
For the app with just 3 screens and not a lot business logic, 25 mb and about 60mb after install is really a lot.
According to expo devs more complex apps will be approximately the same size or only slighty larger due to the bulk of the size being the native dependencies, and not actual javascript side.
But this still is a big problem and I will probably have to anyway eject the app to optimze the build size
So in general CRNA is a great and fast way to start and have something working but still before publishing the app to the users you'll not avoid seting up your custom build and all the dependencies like Android Studio
I think create-react-native-app is a good way to start so that you can focus on the React part of react native, especially if you are not familiar with React. And when you are ready to do things with native you can simply eject with npm run eject
When I started a new project with react native late last year, there was no create-react-native-app and I evaluated expo first. I didn’t like it as there were no easy native integration unless you eject when I know for sure we will need native integration. Therefore I went with vanilla react native. Also I already had experience with React on the web and iOS and Android native development.
TLDR
if you create project by create_react_native_app myproject
then it contains expo setting (not recomended )
if you create project by react-native myproject
then its plain react-native (recommended for small ,medium,large to projects )
Note : to use react-native command in terminal use this link
I would like to share my experience of app development . As I was new with react I started with CRNA and it went smoothly . Expo really provides many features like push notification , animations (recommended Lottie by Airbnb) and peace of mind that you can eject your app anytime you want to use native libraries with app . Best part is you don't have to rewrite any code and all expo exclusive features will work as well .
Therefore CRNA(use as much you can)+eject(when you need native libraries) = sweet spot .

Converting Existing React Native Projects to Expo

I'm considering building mobile apps in React Native using Expo and I noticed under FAQ that existing React Native projects can be converted to Expo.
What exactly are we converting? I really like staying as pure and clean as possible without too many abstraction layers in the middle which can obscure my ability to understand what's really happening for things to work in the app.
I'd appreciate a bit more clarification about what's really happening in the conversion process and what Expo is adding to the existing project.
This topic is covered in the Expo XDE readme.
However, we didn't get it working and decided to port our code into the default Expo app (Edit: after hitting a lot of issues porting our app to Expo, we decided to revert to vanilla RN).
There are at least a few required steps missing from the documentation:
Create exp.json file
Update React and React Native libraries to the versions required by Exponent
"react": "16.0.0-alpha.6",
"react-native": "https://github.com/expo/react-native/archive/sdk-16.0.0.tar.gz",
We summarized on our blog why we gave up on Expo in its current form.