Technically Tia
Expo vs React Native
27 March 2023
React Native

Expo vs bare React Native…the Pros and Cons

React Native is one of the most popular cross-platform mobile app development frameworks. It is an open-source platform that allows developers to create mobile applications using the same programming language and logic as for web development. There are two popular ways to use React Native, either by using the bare minimum React Native or using Expo. Both have their advantages and disadvantages and that's what we're going to look at this article...

Bare React Native

Pros:

  • More Control: Bare React Native gives you complete control over your project. You can customize your application as per your needs and preferences. You can add and remove features, libraries, and modules as required. This level of control is not available with Expo, which comes with pre-built components and libraries.

  • Better Performance: Bare React Native apps have better performance than Expo apps. This is because Expo comes with pre-built components that can slow down the application. With bare React Native, you can optimize your code and have more control over the app's performance.

  • Flexibility: Bare React Native offers more flexibility than Expo. You can use third-party libraries and components easily, which may not be possible with Expo. This flexibility allows you to customize your application to a greater extent.

Cons:

  • Steep Learning Curve: Bare React Native requires more in-depth knowledge of React and native mobile app development than Expo. The setup and configuration process can be complicated and time-consuming for beginners.

  • Tedious Setup: Setting up a bare React Native project can be a tedious process, as it involves installing and configuring several packages, including native modules, libraries, and tools.

  • Mac Required: To develop using bare React Native, you need a Mac since you need to use Xcode, which is only available on Apple OS.

Expo

Pros:

  • Easy to Use: Expo is easy to use, even for beginners. It even feels pretty natural if you've already spent a lot of time using React. Expo provides pre-built components and libraries that you can use to build your application, plus a simple setup and configuration process.

  • Faster Development: With Expo, you can develop mobile applications faster than with bare React Native. The pre-built components and libraries save development time, and the hot reloading feature makes it easy to see the changes you make instantly.

  • Publishing: Creating a build ready for the app store is a fairly simple process using EAS.

  • Available To Everyone: You don't need a Mac to develop an ios app using Expo. You can create an app that will work on both ios or Android, whithout even needing to run a simulator, since you can use the Expo Go app on your mobile device.

Cons:

  • Limited Control: Expo comes with pre-built components and libraries, which means you have limited control over the application's features and functionality. This can be a drawback if you want to customize your application.

  • Limited Flexibility: Since Expo comes with pre-built components, you may not be able to use third-party libraries and components that are not compatible with Expo.

  • Performance: Expo may have slower performance than bare React Native because of the pre-built components and libraries that come with it.

  • When You Don't Want Expo Any More: Removing Expo and changing your app to bare React Native at a later date can be frustrating and time consuming.


In Conclusion

Bare React Native and Expo both have their advantages and disadvantages. If you have experience in native mobile app development and want more control and flexibility over your application, bare React Native is the way to go. However, if you are a beginner or want to develop mobile applications faster and easier, then Expo is the better choice. Ultimately, the choice between the two depends on your specific requirements and preferences.

My personal recommendation would be to start out with Expo if you're new to learning React Native. Once you feel comfortable and familiar with React Native concepts, then switch to bare workflow. That's what I did :smiley: