41

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?

halfer
  • 19,824
  • 17
  • 99
  • 186

4 Answers4

25

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

tomekz
  • 266
  • 2
  • 4
9

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.

hyb175
  • 1,291
  • 8
  • 13
  • How do you add webpack + typescript + unit testing + test coverage on your app? – Juni Brosas Jul 25 '17 at 06:17
  • 1
    We don’t use webpack, just whatever the React native default bundler. Although you can checkout https://github.com/callstack-io/haul for using webpack with React Native. I haven’t used typescript but we are in the process of adding flow to the project. We use jest for testing, which is integrated with istanbul already to provide nice test coverage output. – hyb175 Jul 25 '17 at 06:28
  • Hi, I am new to React Native. I created my app with create-react-native-app i then build my apk with expo however the apk size was to big, 25mb+ my question is does create-react-native-app automtically include expo modules? – Rudolph Opperman Feb 27 '18 at 15:46
  • @RudolphOpperman Hi, you are correct. create-react-native-app has the whole built-in expo SDK which is very big. If the package size is a concern then you should definitely eject. – hyb175 Feb 27 '18 at 20:07
  • @hyb175 I have had some difficulty ejecting and its a mess cause my version control(local-git) doesn't remove all the folders after it fails.I just want to know when ejecting can I still use libraries I added like native-base and Stack navigator? – Rudolph Opperman Mar 01 '18 at 06:28
0

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

vijay
  • 10,276
  • 11
  • 64
  • 79
0

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 .