Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between react-native cli and Expo with Bare workflow? [closed]

I am going to build a very big application with multiple complex functionalities. but I am stuck on bellow points -

  1. What is the difference between react-native cli and Expo with Bare workflow?
  2. what Should I include in my project and why?
  3. is expo created by facebook?
like image 287
Avinash Avatar asked Dec 04 '22 17:12

Avinash


2 Answers

What is the difference between react-native-cli and Expo with Bare workflow?

Expo with Bare workflow is basically a react-native-cli app that is already preconfigured in order 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 the setting up of the react-native-unimodules package which is 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 expo managed app are missing in the bare workflow but Expo is working on 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 final goal of the project 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 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 app according to the official react-native documentation).

like image 171
Ivo Avatar answered Dec 06 '22 10:12

Ivo


Expo is written on top of react-native to overcome the issues and challenges that developers face in the development, When it offers some features then it also has some limitations as well.

What is the difference between react-native CLI and Expo with Bare workflow?

The key difference between these two is the management of different react-native packages. Expo holds almost(not all) everything that react-native has so instead of installing and managing a module separately it offers everything within the expo, So you don't need to take care separate native modules as and expo will do for you but expo has a limitation that if something new launched in react-native until expo adds it in expo you can't use it. Another limitation is you can't use a library that requires linking because of expo manages this thing for you and you have a boundary to use libraries that expo supports(Managed workflow). Expo manages the build system for you, So you don't have to use Android-studio or Xcode for making builds. It has a limitation about the size, So your app can't be below(Android 2MB, IOS 25MB) to this even if a single screen app.

Limitations with managed workflow

  1. Not all iOS and Android APIs are available.

  2. The SDK doesn't support all types of background code execution If you need to keep your app size extremely lean, the managed workflow may not be the best choice.

  3. Native libraries to integrate with proprietary services are usually not included in the SDK.

  4. The only supported push notification service is the Expo notification service.

  5. The minimum supported OS versions are Android 5+ and iOS 10+.

  6. Free builds can sometimes be queued.

Bare workflow

Bare workflow gives you more control over linking native libraries and managing builds.

On the other hand with react-native CLI you have the freedom to install anything and size also depends on your app.

In the bare workflow we have full access to the underlying native projects and any native code. It's a "bare" native project with React Native and one or more packages from the Expo SDK installed. Anything that you can do in a native project is possible here.

In the bare workflow, the developer has complete control, along with the complexity that comes with that. You can use most APIs in the Expo SDK, but the build service and easy configuration with app.json are not yet supported. You can refer to tutorials and guides that are oriented towards native iOS and Android apps and React Native for alternatives.

Limitations with bare workflow

  1. Build service only works in the managed workflow.

  2. Configuration must be done on each native project rather than once with app.json

Here is a comparison between these.

https://docs.expo.io/introduction/managed-vs-bare/?redirected#workflow-comparison

What Should I include in my project and why?

It depends, You have to figure it out everything that you wanted to use inside the app is been supported on the expo, If everything(Every Native Module) is available then it's okay to use expo otherwise if you have to eject in between the development it's a painful process.

Is the expo created by Facebook?

Officially not, but it has the support of some core developers of react-native.

Here is a link that offers a comparison between these two.

What is the difference between Expo CLI and React Native CLI?

like image 31
Waheed Akhtar Avatar answered Dec 06 '22 10:12

Waheed Akhtar