Comparing React vs React Native
Building an app is quite different from building a website. While both require some consideration when it comes to picking a language, that’s pretty much where the similarities end. This article will explore the various differences and how those differences led us to Expo.
React vs. React Native
For the sake of argument, let’s say we chose React for a website and React Native for an app.
You can run your basic terminal commands found here to get started with React. Within a few minutes, you’re up and running. You could easily create a one-page application in a matter of hours. Furthermore, you could probably set up Router and Redux to manage routes and state by the end of the day.
For React Native, the flow is slightly different, if not slightly more confusing. You can run these terminal commands to get a basic React Native package. However, If you’ve ever dealt with React Navigation, then you know the setup is just getting started. Creating different StackNavigator’s for different features requires a pretty solid idea of the user experience from the off. Setting up Redux is still relatively straightforward, but can still take a few hours.
Second, a React demo is much more straightforward than a React Native demo. It’s quite easy to host your project on Firebase or AWS and send a link to the necessary people. From there you simply run production builds every time you have a new feature to show your client.
There are seemingly dozens of ways to get a React Native demo on a client’s phone. All options have advantages and disadvantages, but most seem to have more of the latter. Getting new features in real time and testing on different devices are incredibly important, and where most demo apps fail.
With all of this in mind, we decided a React Native framework was necessary to jumpstart app development for our project. There are a few out there, and all claim to be the best. I’m sure they have great features, but for us, it came down to Pepperoni and Expo.
Pepperoni Vs Expo
Both call themselves frameworks, but that’s not really true. They’re more like boilerplates that include common use-cases. Both claim to make it easy to demo and eventually push your app to the app store. Both claim to make starting your project incredibly easy. Why would anyone start from scratch?
Pepperoni
- Limited documentation
- No unit tests to make up for lack of documentation
- Not easy to engage with the developer community
- Common Navigation Flow
Expo
- NPM packages must be pure JavaScript
- Common Navigation Flow
- Easier to share progress with clients
- Extensive Documentation
- Active community
- Code implementation examples
For us, Expo was the winner. As a small development team trying to accomplish cool things, we really appreciate what Pepperoni is trying to do, and hope the ecosystem improves in the near future as it becomes more popular. With that said, Expo’s active community and extensive documentation made it the clear favorite.
Conclusion
Building an app requires much more consideration when compared to building most websites. If you want to get a jumpstart on your codebase with industry best practices, a framework is probably a great solution for you. We chose Expo for the reasons laid out above, but we have never claimed to know everything. I hope this provides a little insight into things you can expect when trying to decide on a framework for your next project. There are a lot of really cool things going on in the native community right now, we love being a part of it and can’t wait to see where these frameworks go. Happy coding!