Bare React Native Vs Expo.

motionmedia.co.in
3 min readJul 6, 2021

--

A Debatable Topic of the Same Family,

Expo vs Bare workflow

Expo with Bare workflow is basically a react-native-cli app that is already preconfigured to support most of the Expo packages (here are the supported API in the bare workflow: https://docs.expo.io/bare/unimodules-full-list/ ). With a bare app, you meet halfway between expo managed and react-native-cli. The main configuration that is already made when initiating a bare app is setting up the react-native-unimodules package provided by the Expo team (https://github.com/expo/expo/tree/master/packages/react-native-unimodules).

In a bare app, you need Xcode and Android studio just as for a plain react-native-cli app.

In the bare app, you can install most of the Expo packages but you have to follow the specific installation instructions for the bare workflow (e.g: install with npm, linking, pod install, etc…).

Expo bare apps have to be started with the react-native command, they do not use the expo cli after their creation.

Most of the convenient features of the expo-managed app are missing in the bare workflow, but Expo is integrating most of them over time.

what Should I include in my project and why?

What you should include depends on your needs. A strong analysis of the project's final goal will let you decide between managed workflow on one side and bare workflow / react-native-cli on the other side.

The choice between bare workflow and react-native-CLI is simpler as they are basically the same but bare workflow has some extra configurations already made.

is the expo created by Facebook?

No, but Expo is recognized by them as a really useful tool for react-native development. (that’s why expo is one way of creating an app according to the official react-native documentation).

My Opinion.

I will recommend using react-native cli over expo bare workflow because of the bellow reasons.

  1. Expo bare workflow is not developed by the Facebook team, so when there is a new update in RN Cli, the expo takes 1–2 months to add to its workflow.
  2. You can not control the size of the app because the expo includes a pre-included library in SDK. (minimum prod build starts from 29MB-38MB)
  3. App deployment and coding styling are the same in both bare-work flows RN Cli, then why not use React native Cli.
  4. Ejecting Expo in the middle of an ongoing project is a really painful process.
  5. you may (very rarely) face compatibility issues with external lib.
  6. you face any error related to expo config, then the chances of finding its answer over the internet are very less.

When to use expo bare workflow
if you have a really good understanding of react-native architecture and you know the depth technical requirements of a project. Also, you should aware of available expo libraries and how many things you are going to use in your project and you are not bothered about app size too.

Note: expect the above points you won't see any difference between RN cli and bare workflow while coding.

--

--