React Native vs CRNA [closed] - react-native

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 .

Related

Will this module work in expo or react native?

I am new to react native and expo.
This is the module i am looking at: https://github.com/leesiongchan/react-native-esc-pos
I want to build an app that can print using bluetooth thermal printer. I am not sure if i should build it using react native or expo. Please advise me.
Thank you.
Expo has its own limitations and there are even some bugs there too, Its good for quick development as the documentation suggests the same that it is good to get you started with development within minutes without much hustle. In my opinion, React Native CLI is most of the time the best option even if you are new to react native development. Because of the following reasons
You will learn a lot as you will get your hands dirty in core react native app development.
You won't have to deal with expo limitations
You won't have to be dependent on expo tools
Any Library which requires linking or contains native modules will not work with the expo.
The library you mentioned uses many native modules and usually these type of libraries are not supported and that is the reason why they've built their own APIs and Native Components you can read this,
the developer has not mentioned Expo support anywhere on the docs but still You can open an issue on GitHub and ask the developer if it supports EXPO platform or not, or maybe instead of asking you can try the library yourself and you will find out if its working or not,

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

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.

What is the difference between expo and react native app developing? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
I am going to develop react native app using Expo but I don't have idea which one is best? Please suggest me any idea?
Actually I am using Expo. Which is best Expo or normal Android or Xcode development?
When you write code in Expo (abbr. XDE), you write React Native code. Expo has two main pieces:
1) XDE: a developer tool for creating projects, viewing logs, opening on your device, publishing, etc.
2) The Expo client: an app on your phone that lets you open your projects while you're working on them, without needing to go through XCode or Android Studio, and also lets other people view them too!
But ...
With most apps in React Native, you end up needing to utilise several
third party native libraries, which Expo doesn’t current support
outside of their built in APIs. There are a lot of things that can be
done in JS only, but I’ve always ended up running into a need for
native libraries with every React Native project I’ve worked on
(several production apps). That being said, Expo does support
“detaching” your app from Expo, which will allow you to carry on with
a standard free standing React Native app.
Expo has some advantages over using normal Xcode/Studio like expo client, but it also has its cons when it comes to large scale applications . You can choose based on your needs.
If you’re just getting started and you need to get off the ground quickly, I’d definitely recommend Expo
Note: This answer is a blend from multiple developers

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/

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.