Apium Innovations
Published in

Apium Innovations

What I wish I knew when I started to work with React Native — Part 1

Image Source: www.wikipedia.org

React Native, the widely known open source mobile application framework created by Facebook for the creation of cross-platform mobile applications took the mobile programming world by storm. In this article I present you some key points, I wish I had known when I started developing React Native applications. This article will not get in to details on how to build a React Native app, rather it can be a guide for you to get an overview on React Native. I recommend you to read the Expo and React Native documentation to further broaden your understanding on React Native before you start to build your application.

Expo is a framework and a platform for React Native applications. It’s a toolchain that guides you through most of the problems while developing. You don’t need to use XCode and Android to build Expo applications. But if you want to use native modules and to use third party libraries which uses native modules you might want to go with React Native CLI.

Managed and bare workflows are the approaches to building applications with Expo tools. In managed workflow you write JavaScript/TypeScript and Expo manages everything else for you and in the bare workflow you have full control over your native project and Expo tools and services are slightly limited. What is the better one? Well, it depends on the complexity of the app you are building. If your app needs native modules, that will be the gamechanger.

The official Expo documentation lists a set of limitations as below.

1.You can’t add native libraries to an Expo project — With managed workflow, Expo doesn’t support custom Native code. Expo offers a large set of native modules that are mostly needed for development, but if you need to add native modules that expo doesn’t offer to your application expo may not be the way to go.

2.The app size can be large when using managed workflow — This is one of the problems that you may encounter. This is because managed workflow stores a bunch of APIs even if you need them or not.

3. Expo doesn’t support all types of background code executions — Expo supports background geolocation, geofencing and background fetch, but background audio and push notifications cannot be handled in the background.

4. Free builds can be queued — You can easily build your app for submission for free, Expo handles almost everything. But the builds can be queued according to the number of users. It may occasionally take up to 30 minutes to build.

Always have simple navigation. Having a messy navigation map can result memory leaks in your app. Be careful when passing data through navigation. Because if it is not properly handled it can cause the application to crash.

Pick active libraries when choosing third party applications. React Native is updated regularly. If the third-party library is outdated, it can cause dependency issues.

Await Part 2 of this article for more exciting things about React Native...

Interested in what we do? Check us out at www.apium.io

References