Converting Existing React Native Projects to Expo - react-native

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.

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,

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

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.

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 .